Bug 1128637
Summary: | GDB auto-loading declined message in crash reports | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Steeve Goveas <sgoveas> | ||||||
Component: | abrt | Assignee: | Jakub Filak <jfilak> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Martin Kyral <mkyral> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 7.0 | CC: | jan.kratochvil, jberan, jfilak, mkyral, rvokal, sgoveas | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | abrt-2.1.11-18.el7 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2015-03-05 13:26:47 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 1163339 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Steeve Goveas
2014-08-11 09:14:06 UTC
Thank you for the report! gdb tries to auto-load /var/cache/abrt-di/usr/lib/debug/usr/lib64/libpython2.6.so.1.0.debug-gdb.py file but the file path is not on the "auto-load safe-path" list. We have disabled auto-loading in upstream and I think we should do the same thing in RHEL. commit 77a270a948216a8bb5bcc960042aeb467794b593 Author: Jakub Filak <jfilak> Date: Mon Jun 9 17:13:09 2014 +0200 gdb: disable loading of auto-loaded files https://sourceware.org/gdb/onlinedocs/gdb/Auto_002dloading.html There are two main reasons for doing so: 1. we cannot trust anybody - the auto-loaded file may change the output format - security? 2. bugs in such a files (#817) You should be able to work around this bug by adding "add-auto-load-safe-path /var/cache/abrt-di/usr/lib/debug/usr/lib64" to /root/.gdbinit. Steeve, please install the following scratch build, re-test and report the results here. https://brewweb.devel.redhat.com/taskinfo?taskID=7828521 The new build seems to have resolved the issue. I dont see the warning message anymore in httpd crash report. # rpm -q abrt abrt-2.1.11-12.rhbz1128637.1.el7_0.x86_64 Crash report ---------------- abrt_version: 2.1.11 cmdline: /usr/sbin/httpd -DFOREGROUND executable: /usr/sbin/httpd hostname: hp-ms-01-c21.testrelm.test kernel: 3.10.0-123.el7.x86_64 last_occurrence: 1407836016 pid: 23947 pkg_arch: x86_64 pkg_epoch: 0 pkg_name: httpd pkg_release: 17.el7 pkg_version: 2.4.6 pwd: /etc/httpd runlevel: N 3 time: Tue 12 Aug 2014 05:33:36 AM EDT uid: 48 username: apache sosreport.tar.xz: Binary file, 5489260 bytes backtrace: :[New LWP 23947] :[Thread debugging using libthread_db enabled] :Using host libthread_db library "/lib64/libthread_db.so.1". :Core was generated by `/usr/sbin/httpd -DFOREGROUND'. :Program terminated with signal 11, Segmentation fault. :#0 0x00007f9939f44bd7 in semop () at ../sysdeps/unix/syscall-template.S:81 :81 ../sysdeps/unix/syscall-template.S: No such file or directory. : :Thread 1 (Thread 0x7f993b937840 (LWP 23947)): :#0 0x00007f9939f44bd7 in semop () at ../sysdeps/unix/syscall-template.S:81 :No locals. :#1 0x00007f993a645634 in proc_mutex_sysv_acquire (mutex=0x7f993ce54948) at locks/unix/proc_mutex.c:254 : rc = <optimized out> Created attachment 926020 [details]
A patch fixing this issue
Removing needinfo flag The patch is wrong. ABRT must not turn off GDB auto-load because it turns off the pretty printer. The correct fix is to add /var/cache/abrt-di to safe-path and scripts-directory. gdb ... -iex 'add-auto-load-safe-path /var/cache/abrt-di' -iex 'set auto-load scripts-directory $debugdir:$datadir/auto-load:/var/cache/abrt-di' the latter should be only temporary and must be replaced by a gdb's command similar to add-auto-load-safe-path which does not exist yet. How to reproduce the described behaviour using will_segfault: 1. mkdir -p /var/cache/abrt-di/usr/lib/debug/usr/bin && cd /var/cache/abrt-di/usr/lib/debug/usr/bin 2. printf "#"'!'"/usr/bin/python\nprint \"auto-loaded python GDB script\"\n" > will_segfault-gdb.py 3. will_segfault 4. cd /var/tmp/abrt/$problem_dir 5. abrt-action-generate-backtrace 6. grep -q "auto-loaded python GDB script" backtrace && echo "OK" 7. grep -q -v "auto-loading has been declined by your" bactrace && "OK" Upstream test case: https://github.com/abrt/abrt/blob/master/tests/runtests/ccpp-plugin/runtest.sh#L84 Created attachment 959542 [details]
A patch fixing this issue
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0556.html |