Bug 1306413 - [abrt] nano: main(): nano killed by SIGSEGV
[abrt] nano: main(): nano killed by SIGSEGV
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: nano (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:38d229b90d39107ef3fccc8aa4f...
: Patch
: 1306272 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-10 14:01 EST by Don Swaner
Modified: 2016-02-16 22:50 EST (History)
3 users (show)

See Also:
Fixed In Version: nano-2.4.2-3.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-16 22:50:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (49.06 KB, text/plain)
2016-02-10 14:01 EST, Don Swaner
no flags Details
File: cgroup (200 bytes, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: core_backtrace (447 bytes, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: dso_list (837 bytes, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: environ (3.30 KB, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: exploitable (82 bytes, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: limits (1.29 KB, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: maps (3.67 KB, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: mountinfo (3.50 KB, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: open_fds (207 bytes, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: proc_pid_status (1.00 KB, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details
File: var_log_messages (298 bytes, text/plain)
2016-02-10 14:02 EST, Don Swaner
no flags Details

  None (edit)
Description Don Swaner 2016-02-10 14:01:51 EST
Description of problem:
1.  edit a file with nano (with "set locking" in .nanorc)
2.  start another nano session on the same file.
3.  at the locking conflict prompt enter N

Version-Release number of selected component:
nano-2.4.2-2.fc23

Additional info:
reporter:       libreport-2.6.4
backtrace_rating: 4
cmdline:        nano temp.txt
crash_function: main
executable:     /usr/bin/nano
global_pid:     3499
kernel:         4.3.5-300.fc23.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (0 frames)
Comment 1 Don Swaner 2016-02-10 14:01:58 EST
Created attachment 1122875 [details]
File: backtrace
Comment 2 Don Swaner 2016-02-10 14:02:00 EST
Created attachment 1122876 [details]
File: cgroup
Comment 3 Don Swaner 2016-02-10 14:02:01 EST
Created attachment 1122877 [details]
File: core_backtrace
Comment 4 Don Swaner 2016-02-10 14:02:02 EST
Created attachment 1122878 [details]
File: dso_list
Comment 5 Don Swaner 2016-02-10 14:02:03 EST
Created attachment 1122879 [details]
File: environ
Comment 6 Don Swaner 2016-02-10 14:02:05 EST
Created attachment 1122880 [details]
File: exploitable
Comment 7 Don Swaner 2016-02-10 14:02:06 EST
Created attachment 1122881 [details]
File: limits
Comment 8 Don Swaner 2016-02-10 14:02:07 EST
Created attachment 1122882 [details]
File: maps
Comment 9 Don Swaner 2016-02-10 14:02:08 EST
Created attachment 1122883 [details]
File: mountinfo
Comment 10 Don Swaner 2016-02-10 14:02:09 EST
Created attachment 1122884 [details]
File: open_fds
Comment 11 Don Swaner 2016-02-10 14:02:11 EST
Created attachment 1122885 [details]
File: proc_pid_status
Comment 12 Don Swaner 2016-02-10 14:02:12 EST
Created attachment 1122886 [details]
File: var_log_messages
Comment 13 Kamil Dudka 2016-02-10 14:21:43 EST
*** Bug 1306272 has been marked as a duplicate of this bug. ***
Comment 14 Kamil Dudka 2016-02-10 14:23:13 EST
The backtrace does not make any sense to me.  Are you sure you have up2date debuginfo packages installed?
Comment 15 Don Swaner 2016-02-10 14:59:27 EST
5 or 8 new packages were automatically installed today during the reporting of this bug (1306413), so I assume the debuginfo is current.  If there is some additional check I need to do to insure it is current, I don't know how to do that.
Comment 16 Kamil Dudka 2016-02-11 08:26:43 EST
The backtrace is actually correct although it contains only the main() frame.  Sorry for not recognizing it previously!  The following patch will fix it:

--- a/src/nano.c
+++ b/src/nano.c
@@ -520,15 +520,12 @@ openfilestruct *make_new_opennode(void)
     openfilestruct *newnode =
        (openfilestruct *)nmalloc(sizeof(openfilestruct));

-    newnode->filename = NULL;
-    newnode->fileage = NULL;
-    newnode->filebot = NULL;
-    newnode->edittop = NULL;
-    newnode->current = NULL;
+    /* make sure that everything is initialized instead of open-coding
+     * NULL assignments that compilers do not check for completeness */
+    memset(newnode, 0, sizeof *newnode);
+
 #ifndef NANO_TINY
-    newnode->current_stat = NULL;
     newnode->last_action = OTHER;
-    newnode->lock_filename = NULL;
 #endif

     return newnode;
Comment 17 Kamil Dudka 2016-02-11 08:30:19 EST
pushed to the f23 branch dist-git:

http://pkgs.fedoraproject.org/cgit/rpms/nano.git/commit/?id=798e2b0d
Comment 18 Fedora Update System 2016-02-11 08:40:21 EST
nano-2.4.2-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7cad63cca8
Comment 19 Don Swaner 2016-02-11 09:45:50 EST
The bug occurred when nano was executed in a MATE terminal with monospace 12 font size.  If I "zoom out" so that the font size is smaller, then the bug does not occur.
Comment 20 Kamil Dudka 2016-02-11 10:05:37 EST
Could you please re-test it with nano-2.4.2-3.fc23?

http://koji.fedoraproject.org/koji/buildinfo?buildID=734964
Comment 21 Fedora Update System 2016-02-14 11:23:46 EST
nano-2.4.2-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7cad63cca8
Comment 22 Fedora Update System 2016-02-16 22:50:53 EST
nano-2.4.2-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

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