Bug 601709 - [5.5] The target program of gdb is terminated by SIGILL signal
Summary: [5.5] The target program of gdb is terminated by SIGILL signal
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb
Version: 5.5
Hardware: ia64
OS: Linux
high
high
Target Milestone: rc
: 5.6
Assignee: Jan Kratochvil
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 615538
Blocks: 616315
TreeView+ depends on / blocked
 
Reported: 2010-06-08 13:49 UTC by Alan Matsuoka
Modified: 2018-10-27 12:00 UTC (History)
8 users (show)

Fixed In Version: gdb-7.0.1-25.el5
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
Environment:
Last Closed: 2011-01-13 23:54:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
testpro.tar.bz2 (1.28 KB, application/x-bzip2)
2010-06-08 13:51 UTC, Alan Matsuoka
no flags Details
sosreport-localhost-793395-ee1734.tar.bz2 (508.98 KB, application/x-bzip2)
2010-06-08 13:51 UTC, Alan Matsuoka
no flags Details
Temporary fix for gdb-7.0.1-23.el5. (1.11 KB, patch)
2010-07-01 19:30 UTC, Jan Kratochvil
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0099 0 normal SHIPPED_LIVE gdb bug fix update 2011-01-12 17:21:16 UTC

Description Alan Matsuoka 2010-06-08 13:49:49 UTC
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.

Comment 1 Alan Matsuoka 2010-06-08 13:51:02 UTC
Created attachment 422202 [details]
testpro.tar.bz2

Comment 3 Alan Matsuoka 2010-06-08 13:51:37 UTC
Created attachment 422204 [details]
sosreport-localhost-793395-ee1734.tar.bz2

Comment 4 Jan Kratochvil 2010-07-01 19:30:32 UTC
Created attachment 428534 [details]
Temporary fix for gdb-7.0.1-23.el5.

Checking it more to make it suitable for upstream.

Comment 9 Jan Kratochvil 2010-07-19 08:59:21 UTC
Post upstream:
[patch] Fix linux-ia64 on SIGILL for deleted breakpoint
http://sourceware.org/ml/gdb-patches/2010-07/msg00275.html

Comment 16 Eva Kopalova 2010-11-16 17:04:30 UTC
    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.

Comment 18 errata-xmlrpc 2011-01-13 23:54:28 UTC
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


Note You need to log in before you can comment on or make changes to this bug.