bugGNU FreeIPMI - Bugs: bug #49813, libfreeipmi crashes when using...

 
 

bug #49813: libfreeipmi crashes when using multithreading >1024 threads

Submitted by:  None
Submitted on:  Fri 09 Dec 2016 03:31:23 PM UTC  
 
Category: libfreeipmiSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 09 Dec 2016 10:35:12 PM UTC, comment #2:

It's now in the master branch, should be out in the next major release. If you are interested it being backported to the stable line, PLMK

Albert Chu <chu11>
Project Administrator
Fri 09 Dec 2016 04:43:06 PM UTC, comment #1:

In principle replacing select w/ poll is a good idea. Would you be able to supply a patch instead of the whole file? Thanks.

Alternately, you could send a pull request to

https://github.com/chu11/freeipmi-mirror

Albert Chu <chu11>
Project Administrator
Fri 09 Dec 2016 03:31:23 PM UTC, original submission:

the _api_lan_recvfrom uses the select() function to receive data from the network. select() uses FD_SET to write into the file-descriptors. Stupidly, the maximum count of fd's, select() can use is 1024. If you use a multithreaded program with libfreeipmi with more than 1024 calls (in my case: 1600threads) then often the program crashes with stack-smashing errors.

Replacing the select() call in the _api_lan_recvfrom by poll() solves the problem.

attached files: my version of the c-file which is running fine with multithreading

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #39185:  ipmi-lan-session-common.c added by None (148KiB - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by chu11 (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 09 Dec 2016 10:35:36 PM UTCchu11Open/ClosedOpen=>Closed
    Fri 09 Dec 2016 10:35:29 PM UTCchu11StatusNone=>Fixed
    Fri 09 Dec 2016 03:31:23 PM UTCNoneAttached File-=>Added ipmi-lan-session-common.c, #39185

    Back to the top


    Powered by Savane 3.1-cleanup1