From owner-freebsd-questions@freebsd.org Thu Nov 5 18:20:01 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 550BC46DF90 for ; Thu, 5 Nov 2020 18:20:01 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [174.136.98.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.nomadlogic.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRsJ03RtZz3FXK for ; Thu, 5 Nov 2020 18:20:00 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from [192.168.1.160] (cpe-24-24-163-126.socal.res.rr.com [24.24.163.126]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id a36e109d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Thu, 5 Nov 2020 18:19:53 +0000 (UTC) To: questions list From: Pete Wright Subject: Helping understand cause of SIGSEGV Message-ID: Date: Thu, 5 Nov 2020 10:19:52 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 Content-Language: en-US X-Rspamd-Queue-Id: 4CRsJ03RtZz3FXK X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates 174.136.98.114 as permitted sender) smtp.mailfrom=pete@nomadlogic.org X-Spamd-Result: default: False [-0.42 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[174.136.98.114:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[174.136.98.114:from:127.0.2.255]; DMARC_NA(0.00)[nomadlogic.org]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.12)[-0.115]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 18:20:01 -0000 i was hoping someone with more experience in C and threading can help me better understand this SIGSEGV fault I'm hitting.  the background is I'm trying to get sysutils/fluent-bit working on 12.2-RELEASE as well as on CURRENT. I've created the following PR and upstream github issues: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250825 https://github.com/fluent/fluent-bit/issues/2747 so where i am at now is i am able to generate a useful core file when it hits the fault and can step through it in lldb. here is the output from fluent-bit: |[2020/11/04 22:18:12] [debug] [task] created task=0x416410a0 id=0 OK [2020/11/04 22:18:12] [trace] [thread 0x416091c0] created (custom data at 0x416091e0, size=80 [2020/11/04 22:18:12] [engine] caught signal (SIGSEGV) #0  0x406d11ee          in  thr_sighandler() at /lib/libthr/thread/thr_sig.c:246 Abort trap (core dumped)| here's an example from one of the threads (the github link above has the full backtrace) from lldb: | thread #1, name = 'fluent-bit', stop reason = signal SIGABRT   * frame #0: 0x000000004087100a libc.so.7`__sys_thr_kill at thr_kill.S:4     frame #1: 0x00000000407e6c84 libc.so.7`__raise(s=6) at raise.c:52:10     frame #2: 0x000000004089a5d9 libc.so.7`abort at abort.c:67:8     frame #3: 0x000000000034a7a8 fluent-bit`flb_signal_handler(signal=11) at fluent-bit.c:418:9     frame #4: 0x00000000406d1c20 libthr.so.3`handle_signal(actp=0x00007fffdfffc600, sig=11, info=0x00007fffdfffc9f0, ucp=0x00007fffdfffc680) at thr_sig.c:303:3     frame #5: 0x00000000406d11ef libthr.so.3`thr_sighandler(sig=11, info=0x00007fffdfffc9f0, _ucp=0x00007fffdfffc680) at thr_sig.c:246:2     frame #6: 0x00007fffffffe193     frame #7: 0x000000000036fe0c fluent-bit`tasks_start [inlined] output_params_set(th=0x00000000416091c0, data=0x000000004165d980, bytes=128, tag="random.0", tag_len=8, i_ins=0x0000000040e58000, out_plugin=0x0000000040e2dfc0, out_context=0x00000000416051e0, config=0x0000000040e19180) at flb_output.h:429:5     frame #8: 0x000000000036fd14 fluent-bit`tasks_start [inlined] flb_output_thread(task=0x00000000416410a0, i_ins=0x0000000040e58000, o_ins=0x0000000040e5b000, config=0x0000000040e19180, buf=0x000000004165d980, size=128, tag="random.0", tag_len=8) at flb_output.h:522     frame #9: 0x000000000036fab5 fluent-bit`tasks_start(in=0x0000000040e58000, config=0x0000000040e19180) at flb_engine_dispatch.c:190     frame #10: 0x000000000036f6fd fluent-bit`flb_engine_dispatch(id=0, in=0x0000000040e58000, config=0x0000000040e19180) at flb_engine_dispatch.c:293:5     frame #11: 0x000000000036ce10 fluent-bit`flb_engine_flush(config=0x0000000040e19180, in_force=0x0000000000000000) at flb_engine.c:85:9     frame #12: 0x000000000036d43a fluent-bit`flb_engine_start [inlined] flb_engine_handle_event(fd=20, mask=1, config=0x0000000040e19180) at flb_engine.c:292:13     frame #13: 0x000000000036d3e6 fluent-bit`flb_engine_start(config=0x0000000040e19180) at flb_engine.c:559     frame #14: 0x00000000003564ec fluent-bit`flb_lib_worker(data=0x0000000040e19180) at flb_lib.c:488:11     frame #15: 0x00000000406c87db libthr.so.3`thread_start(curthread=0x0000000040e12500) at thr_create.c:292:16 I was hoping someone here could help point me in the right direction as i'm kinda stuck but not sure where i should start looking? cheers, -pete| -- Pete Wright pete@nomadlogic.org @nomadlogicLA