Bug 1075415

Summary: [abrt] elinks: get_opt_rec(): elinks killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Bruce-Robert Pocock <brpocock>
Component: elinksAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: brpocock, kdudka, ovasik
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/4b5fb8f38448eb0051d77eeb7859279053e3ffc7
Whiteboard: abrt_hash:5162b0bce6ca632b1ba05fc57769afbf85c610a8
Fixed In Version: elinks-0.12-0.37.pre6.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-08 10:08:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Bruce-Robert Pocock 2014-03-12 05:14:25 UTC
Description of problem:
seems to be related to re-starting after a crash or disconnect maybe?

Version-Release number of selected component:
elinks-0.12-0.35.pre6.fc19

Additional info:
reporter:       libreport-2.1.12
backtrace_rating: 4
cmdline:        links
crash_function: get_opt_rec
executable:     /usr/bin/elinks
kernel:         3.12.9-201.fc19.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 get_opt_rec at options.c:200
 #1 get_opt_ at options.c:288
 #2 get_terminal_codepage at terminal.c:121
 #3 bookmark_terminal at bookmarks.c:579
 #4 bookmark_all_terminals at bookmarks.c:622
 #5 bookmark_snapshot at bookmarks.c:712
 #6 bookmark_write_hook at bookmarks.c:116
 #7 trigger_event_va at event.c:166
 #8 trigger_event at event.c:179
 #9 periodic_save_handler at timer.c:35

Comment 1 Bruce-Robert Pocock 2014-03-12 05:14:33 UTC
Created attachment 873332 [details]
File: backtrace

Comment 2 Bruce-Robert Pocock 2014-03-12 05:14:36 UTC
Created attachment 873333 [details]
File: cgroup

Comment 3 Bruce-Robert Pocock 2014-03-12 05:14:38 UTC
Created attachment 873334 [details]
File: core_backtrace

Comment 4 Bruce-Robert Pocock 2014-03-12 05:14:41 UTC
Created attachment 873335 [details]
File: dso_list

Comment 5 Bruce-Robert Pocock 2014-03-12 05:14:43 UTC
Created attachment 873336 [details]
File: environ

Comment 6 Bruce-Robert Pocock 2014-03-12 05:14:46 UTC
Created attachment 873337 [details]
File: exploitable

Comment 7 Bruce-Robert Pocock 2014-03-12 05:14:49 UTC
Created attachment 873338 [details]
File: limits

Comment 8 Bruce-Robert Pocock 2014-03-12 05:14:52 UTC
Created attachment 873339 [details]
File: maps

Comment 9 Bruce-Robert Pocock 2014-03-12 05:14:55 UTC
Created attachment 873340 [details]
File: open_fds

Comment 10 Bruce-Robert Pocock 2014-03-12 05:14:58 UTC
Created attachment 873341 [details]
File: proc_pid_status

Comment 11 Bruce-Robert Pocock 2014-03-12 05:15:00 UTC
Created attachment 873342 [details]
File: var_log_messages

Comment 12 Kamil Dudka 2014-03-12 09:54:45 UTC
Thank you for the bug report!  Is this reproducible?  I have a patch candidate that needs to be tested:

--- a/src/util/lists.h
+++ b/src/util/lists.h
@@ -146,7 +146,8 @@ do { \
 #define list_empty(x) (list_magic_chkbool(x, "list_empty") && (x).next == &(x))

 #define list_is_singleton(x) \
-   (list_magic_chkbool(x, "list_is_singleton") && (x).next == (x).prev)
+   (list_magic_chkbool(x, "list_is_singleton") && (x).next == (x).prev \
+   && !list_empty(x))

 #define list_has_prev(l,p) \
    (list_magic_chkbool(l, "list_has_prev") && (p)->prev !=  (void *) &(l))

Comment 13 Kamil Dudka 2014-03-19 11:06:28 UTC
proposed upstream:

http://thread.gmane.org/gmane.comp.web.elinks/3570

Comment 14 Bruce-Robert Pocock 2014-04-29 03:48:15 UTC
Sorry, I hadn't noticed your feedback. I'm not sure if the precise bug is reproducible; I know elinks crashes a lot when quitting or when the terminal session (e.g. ssh) is disconnected, but I often don't see the ABRT catches for a day or two back on the console...

Comment 15 Kamil Dudka 2014-04-29 09:20:25 UTC
Thanks for the info!  I will submit updates with the patch above.  Please give it a try once it appears in testing.

Comment 16 Kamil Dudka 2014-04-29 09:58:51 UTC
fixed in elinks-0.12-0.38.pre6.fc21

Comment 17 Fedora Update System 2014-04-29 10:00:28 UTC
elinks-0.12-0.36.pre6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/elinks-0.12-0.36.pre6.fc19

Comment 18 Fedora Update System 2014-04-29 10:00:37 UTC
elinks-0.12-0.37.pre6.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/elinks-0.12-0.37.pre6.fc20

Comment 19 Fedora Update System 2014-04-30 04:03:38 UTC
Package elinks-0.12-0.36.pre6.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing elinks-0.12-0.36.pre6.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5774/elinks-0.12-0.36.pre6.fc19
then log in and leave karma (feedback).

Comment 20 Fedora Update System 2014-05-08 10:08:40 UTC
elinks-0.12-0.36.pre6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2014-05-08 10:16:52 UTC
elinks-0.12-0.37.pre6.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.