Bug 1406062

Summary: segfaut in 'sm' component when blocking users
Product: [Fedora] Fedora Reporter: Solomon Peachy <pizza>
Component: jabberdAssignee: Adrian Reber <adrian>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: adrian, dmaphy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jabberd-2.4.0-6.fc25 jabberd-2.4.0-6.fc24 jabberd-2.4.0-6.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-31 06:48:17 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:

Description Solomon Peachy 2016-12-19 15:45:17 UTC
Description of problem:

Due to a massive uptick in spim, I've been needing to block many users.  Unfortuantely, sometimes the act of blocking users triggers a segmentation fault in the server, causing it to crash.

Version-Release number of selected component (if applicable):

jabberd-2.4.0-2.fc25

How reproducible:

~50%.

Steps to Reproduce:
1.  With a jabber client (eg Conversations on Android), block a user

Actual results:

server sometimes crashes

Expected results:

Server should not crash and block the user

Additional info:

Here's the crash info:
       PID: 1027 (sm)
       UID: 100 (jabber)
       GID: 102 (sphinx)
    Signal: 11 (SEGV)
   Timestamp: Thu 2016-12-01 10:58:37 EST (1 weeks 4 days ago)
  Command Line: /usr/bin/sm -c /etc/jabberd/sm.xml
  Executable: /usr/bin/sm
 Control Group: /system.slice/jabberd-sm.service
      Unit: jabberd-sm.service
     Slice: system.slice
   Boot ID: [cut]
  Machine ID: [cut]
  Hostname:  [cut]
   Message: Process 1027 (sm) of user 100 dumped core.
            
            Stack trace of thread 1027:
            #0  0x00007f01d037595b malloc_consolidate (libc.so.6)
            #1  0x00007f01d0378556 _int_malloc (libc.so.6)
            #2  0x00007f01d037a430 malloc (libc.so.6)
            #3  0x0000563a377f931a _sx_buffer_new (sm)
            #4  0x0000563a377f8a64 sx_can_read (sm)
            #5  0x0000563a377f6395 sm_mio_callback (sm)
            #6  0x0000563a3780059d _mio_run (sm)
            #7  0x0000563a377ef592 main (sm)
            #8  0x00007f01d0317580 __libc_start_main (libc.so.6)
            #9  0x0000563a377efac9 _start (sm)

I reported this problem upstream:

  https://github.com/jabberd2/jabberd2/issues/130

With a bit of legwork with valgrind, I discovered that the problem is due to a double-free that can corrupt the heap. I submitted a patch for the crash (and a related problem I found) and it was merged last week:

  https://github.com/jabberd2/jabberd2/commit/48125019452e291b2c57275c789f3d7df87d7146

Please update the Fedora package to include this patch.

Thanks!

Comment 1 Fedora Update System 2016-12-20 15:47:29 UTC
jabberd-2.4.0-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-33fc54e9e5

Comment 2 Adrian Reber 2016-12-20 15:51:19 UTC
Thanks for the bug report and the patch!

Comment 3 Fedora Update System 2016-12-20 16:09:22 UTC
jabberd-2.4.0-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-8ba4818a55

Comment 4 Solomon Peachy 2016-12-20 16:38:13 UTC
Could you also run off an update for F24?  (That's where I'm actually running this..)

Comment 5 Fedora Update System 2016-12-20 16:58:04 UTC
jabberd-2.4.0-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fb40414eb1

Comment 6 Adrian Reber 2016-12-20 17:00:17 UTC
As you mentioned F25 in the affected version I excluded F24 in the beginning. Updates for F24 are on their way.

Comment 7 Fedora Update System 2016-12-21 15:18:26 UTC
jabberd-2.4.0-6.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2016-8ba4818a55

Comment 8 Fedora Update System 2016-12-21 15:48:46 UTC
jabberd-2.4.0-6.fc24 has been pushed to the Fedora 24 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-fb40414eb1

Comment 9 Fedora Update System 2016-12-21 15:50:40 UTC
jabberd-2.4.0-6.fc25 has been pushed to the Fedora 25 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-33fc54e9e5

Comment 10 Fedora Update System 2016-12-31 06:48:17 UTC
jabberd-2.4.0-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-12-31 08:23:15 UTC
jabberd-2.4.0-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2017-01-16 17:21:20 UTC
jabberd-2.4.0-6.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.