Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with file descriptor number higher than 1024 #465

Closed
flashcode opened this Issue Jul 17, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@flashcode
Copy link
Member

flashcode commented Jul 17, 2015

WeeChat randomly crashes when there is at least one file descriptor with a number higher than 1024 (and which is used via hook_fd).

This is because the select function is used and the fd_set used supports file descriptor numbers up to 1024, any higher number can crash WeeChat.
This can happen when running a lot of hook_process (for example 1000), because each process is tracked by WeeChat using pipes (and calls to hook_fd on pipes).

One solution would be to use poll instead of select, and then build an array of struct pollfd, which is not limited in size.

I am not sure, but this could be related to #442.

@flashcode flashcode added the bug label Jul 17, 2015

@flashcode flashcode self-assigned this Jul 17, 2015

@flashcode flashcode added this to the 1.3 milestone Jul 17, 2015

@flashcode flashcode closed this in 3b2ee85 Jul 18, 2015

@flashcode

This comment has been minimized.

Copy link
Member Author

flashcode commented Jul 25, 2015

This issue wasn't related to #442, completely different problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.