[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems with traps
From: |
isabella parakiss |
Subject: |
problems with traps |
Date: |
Thu, 13 Aug 2015 03:55:13 +0200 |
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
- problems with traps,
isabella parakiss <=