RHN System ID: Customer Contact Name: Shinya Izawa Description of Problem: The target program is terminated by SIGILL signal when being debugged with gdb command. This issue occurs when the target program is multi-threaded. And this issue sometimes occurs. Please see the following logs: ========= [root@localhost testpro]# gdb ./thread_111 GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5) Copyright (C) 2009 Free Software Foundation, Inc. ...snip... (gdb) b main Breakpoint 1 at 0x4000000000000ff1: file thread_111.c, line 62. (gdb) run Starting program: /root/iza/testpro/thread_111 [Thread debugging using libthread_db enabled] Breakpoint 1, main (argc=1, argv=0x60000fffff8a7a08) at thread_111.c:62 62 s_num=THREAD_NUM; (gdb) b thread Breakpoint 2 at 0x4000000000000ce2: file thread_111.c, line 27. (gdb) c Continuing. Test Start [14390] [New Thread 0x2000000000d5f240 (LWP 14394)] [New Thread 0x200000000175f240 (LWP 14395)] [Switching to Thread 0x2000000000d5f240 (LWP 14394)] Breakpoint 2, thread () at thread_111.c:27 27 while (thread_num < s_num) /* waiting for all threads started */ (gdb) finish Run till exit from #0 thread () at thread_111.c:27 [New Thread 0x200000000215f240 (LWP 14396)] [Switching to Thread 0x200000000175f240 (LWP 14395)] Breakpoint 2, thread () at thread_111.c:27 27 while (thread_num < s_num) /* waiting for all threads started */ (gdb) delete Delete all breakpoints? (y or n) y (gdb) c Continuing. Program received signal SIGILL, Illegal instruction. ... The target program received SIGILL [Switching to Thread 0x200000000215f240 (LWP 14396)] thread () at thread_111.c:27 27 while (thread_num < s_num) /* waiting for all threads started */ (gdb) ========= Version-Release number of selected component: Red Hat Enterprise Linux Version Number: RHEL5.5 Release Number: GA Architecture: ia64 Kernel Version: 2.6.18-194.el5 Related Package Version: gdb-7.0.1-23.el5 Related Middleware/Application: none Drivers or hardware or architecture dependency: This issue only occurs on ia64. How reproducible: Sometimes Step to Reproduce: I attach a reproducer: testpro.tar.bz2 1. Compile the reproducer: # make 2. Run gdb with the reproducer: # gdb ./thread_111 3. Execute the following gdb subcommands: (gdb) b main (gdb) run (gdb) b thread (gdb) continue (gdb) finish (gdb) delete (gdb) continue Actual Results: The target program of gdb is terminated by SIGILL signal. Expected Results: The target program of gdb is not terminated. Summary of actions taken to resolve issue: none Location of diagnostic data: none Hardware configuration: Model: PRIMEQUEST 520A CPU Info: IPF 1.4GHz x 4 Memory Info: 64GB Hardware Component Information: none Configuration Info: none Business Impact: The target program is sometimes terminated by this issue. Our developers and investigators often use gdb command for debugging work. And many middlewares and applications of Fujitsu are commonly implemented with multi-threads. This issue is very confusing to our middleware and application developers. As a result, they might stop debugging work due to this issue. And when the trouble happens in customers' environment, the investigation of trouble might be delayed by this issue. Target Release: 5.6 Errata Request: async errata for 5.5.z Hotfix Request: No Additional Info: - The sosreport file is attached. sosreport-localhost-793395-ee1734.tar.bz2 (The md5sum is: b9440f2e8006df318c67477467ee1734) SEG Notes: I haven't been able to reproduce this problem yet.
Created attachment 422202 [details] testpro.tar.bz2
Created attachment 422204 [details] sosreport-localhost-793395-ee1734.tar.bz2
Created attachment 428534 [details] Temporary fix for gdb-7.0.1-23.el5. Checking it more to make it suitable for upstream.
Post upstream: [patch] Fix linux-ia64 on SIGILL for deleted breakpoint http://sourceware.org/ml/gdb-patches/2010-07/msg00275.html
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: An SIGILL signal could have terminated a multithreaded program while the programs were being debugged in GDB. GDB processed a queued SIGILL signal even if the user deleted the signal's breakpoint. In such case, the SIGILL signal could break the inferior. With this update, GDB recognizes these cases at the moment when signaled by the target program and ignores the SIGILL signal for a deleted breakpoint.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0099.html