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

 
 

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

Submitter:  None
Submitted:  Fri 09 Dec 2016 03:31:23 PM UTC
   
 
Category:  libfreeipmi Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Crash
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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 Files:
   
   
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
  • -email is unavailable- added by chu11 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-09 chu11 Open/ClosedOpen Closed
    2016-12-09 chu11 StatusNone Fixed
    2016-12-09 None Attached File- Added ipmi-lan-session-common.c, #39185

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code