Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11336

problems with traps

Path csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail
From isabella parakiss <izaberina@gmail.com>
Newsgroups gnu.bash.bug
Subject problems with traps
Date Thu, 13 Aug 2015 03:55:13 +0200
Lines 67
Approved bug-bash@gnu.org
Message-ID <mailman.8229.1439430918.904.bug-bash@gnu.org> (permalink)
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace usenet.stanford.edu 1439430918 32735 208.118.235.17 (13 Aug 2015 01:55:18 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/FVzKsu+/tWceGuIRN8cutVheTsS7/5CKLQIMSVsAtM=; b=FqOJJmIBlQ/bkrWpyyaFYk9BCjbea6XWDiDl8rIaI0/qIP2Y5QJf1W7xCrHLTBE7LA hYoO1noyZp+DQQ3bNY00Frhwb5Xl1ECY+j+0skSLdg9pZWd6eZpltIWscDa2OHSkmYnh 41KG/p2rgIRFhKivktzy4dO593Cy0Y5FqTlpXWAgH14j19mpkyFq442+Gs/pWWqSjxWy qwyaVJHSIwxBKSCc7WHuk+6MOfD+VmvO0XbkKQZUTAuG1fUeFpEKpe0R8drNSvl8DW8z qxuC05kRFrn3uRiVdDv2KnqiGnxG4o/mh31HJUZnwNeUp6IGamZkuxmVjJKiuaqHqYWh 2B7A==
X-Received by 10.50.178.161 with SMTP id cz1mr27672859igc.85.1439430913673; Wed, 12 Aug 2015 18:55:13 -0700 (PDT)
X-detected-operating-system by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value).
X-Received-From 2607:f8b0:4001:c05::231
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11336

Show key headers only | View raw


This segfaults when it receives a SIGUSR1:

#!/bin/bash
trap ': $(:) < <(:)' USR1
while :; do sleep 1; done


I also received a bunch of scary errors like these:
*** Error in `/bin/bash': munmap_chunk(): invalid pointer:
0x0000000002680f80 ***
*** Error in `/bin/bash': corrupted double-linked list: 0x0000000001e54200 ***
*** Error in `/bin/bash': free(): invalid size: 0x000000000115ff80 ***
*** Error in `/bin/bash': double free or corruption (out):
0x0000000000e7af60 ***
https://gist.github.com/anonymous/9b24b3ca0a6ce2203fc8
and bash used 100% of a cpu, but they appeared inconsistently while
trying to debug a script that trapped the SIGWINCH signal.
I'll post more details if needed (and if I can reproduce them).


>From gdb it looks like the problems are in jobs.c
This is the backtrace for the segfault, but it doesn't explain the rest:

Program received signal SIGSEGV, Segmentation fault.
0x000000000044d2e5 in find_pipeline (pid=19266, alive_only=1,
jobp=0x7fffffffdff8) at jobs.c:1357
1357      if (p->pid == pid && ((alive_only == 0 && PRECYCLED(p) == 0)
|| PALIVE(p)))
(gdb) bt
#0  0x000000000044d2e5 in find_pipeline (pid=19266, alive_only=1,
jobp=0x7fffffffdff8) at jobs.c:1357
#1  0x000000000044d419 in find_process (pid=19266, alive_only=1,
jobp=0x7fffffffdff8) at jobs.c:1396
#2  0x0000000000450e0a in waitchld (wpid=-1, block=0) at jobs.c:3393
#3  0x0000000000450b7c in sigchld_handler (sig=17) at jobs.c:3280
#4  <signal handler called>
#5  0x000000000048e0c8 in builtin_address_internal (name=0x7645d0 ":",
disabled_okay=0) at common.c:829
#6  0x000000000048e251 in find_shell_builtin (name=0x7645d0 ":") at common.c:866
#7  0x000000000043c6bf in execute_simple_command
(simple_command=0x763e50, pipe_in=-1, pipe_out=-1, async=0,
    fds_to_close=0x738220) at execute_cmd.c:4200
#8  0x00000000004367f1 in execute_command_internal (command=0x763da0,
asynchronous=0, pipe_in=-1,
    pipe_out=-1, fds_to_close=0x738220) at execute_cmd.c:813
#9  0x0000000000435dd3 in execute_command (command=0x763da0) at
execute_cmd.c:416
#10 0x000000000043ae49 in execute_while_or_until
(while_command=0x764130, type=0) at execute_cmd.c:3432
#11 0x000000000043adb4 in execute_while_command
(while_command=0x764130) at execute_cmd.c:3400
#12 0x0000000000436a55 in execute_command_internal (command=0x764240,
asynchronous=0, pipe_in=-1,
    pipe_out=-1, fds_to_close=0x764050) at execute_cmd.c:920
#13 0x0000000000435dd3 in execute_command (command=0x764240) at
execute_cmd.c:416
#14 0x0000000000421a04 in reader_loop () at eval.c:163
#15 0x000000000041f856 in main (argc=2, argv=0x7fffffffe9b8,
env=0x7fffffffe9d0) at shell.c:760


Hope this helps...


---
xoxo iza

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

problems with traps isabella parakiss <izaberina@gmail.com> - 2015-08-13 03:55 +0200

csiph-web