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

Could not allocate socket in Windows #643

Closed
Jason239 opened this issue Aug 23, 2019 · 6 comments
Closed

Could not allocate socket in Windows #643

Jason239 opened this issue Aug 23, 2019 · 6 comments
Labels
flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@Jason239
Copy link

Jason239 commented Aug 23, 2019

When I try to package with multiple input live stream, 'Could not allocate socket' error has continued to occur like this in Windows OS.

[0823/100915:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://127.0.0.1:11111'.
[0823/100915:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://127.0.0.1:11113'.
[0823/100915:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://127.0.0.1:11112'.
[0823/100915:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://127.0.0.1:11114'.
[0823/100915:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://127.0.0.1:11111'.
[0823/100915:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://127.0.0.1:11113'.
[0823/100915:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://127.0.0.1:11112'.
[0823/100915:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://127.0.0.1:11114'.
[0823/100915:ERROR:udp_file.cc(168)] Could not allocate socket.
[0823/100915:ERROR:udp_file.cc(168)] Could not allocate socket.

Do you know any idea why ?

The command was this.

.\packager.exe \
'in=udp://127.0.0.1:11111,stream=audio,init_segment=./shaka_live/audio/init.mp4,segment_template=./shaka_live/audio/$Number$.m4s' \
'in=udp://127.0.0.1:11112,stream=video,init_segment=./shaka_live/video1/init.mp4,segment_template=./shaka_live/video1/$Number$.m4s' \
'in=udp://127.0.0.1:11113,stream=video,init_segment=./shaka_live/video2/init.mp4,segment_template=./shaka_live/video2/$Number$.m4s' \
'in=udp://127.0.0.1:11114,stream=video,init_segment=./shaka_live/video3/init.mp4,segment_template=./shaka_live/video3/$Number$.m4s' \
--mpd_output ./shaka_live/stream.mpd
@kqyang
Copy link
Contributor

kqyang commented Aug 23, 2019

I have not seen it before. Does it work with one input live stream instead of multiple?

@Jason239
Copy link
Author

It doesn't happen in one input stream.

shaka-bot pushed a commit that referenced this issue Sep 10, 2019
Issue #643.

Change-Id: I8adfb9910e1e43294738abb7783a64645a4f42c3
@kqyang
Copy link
Contributor

kqyang commented Sep 10, 2019

@Jason239 I have updated the code to log the error code on failure. Can you try the latest code?

@Jason239
Copy link
Author

The error code 10093 is printed.

[0911/111811:ERROR:udp_file.cc(178)] Could not allocate socket, error = 10093
[0911/111811:ERROR:udp_file.cc(178)] Could not allocate socket, error = 10093
[0911/111811:ERROR:udp_file.cc(178)] Could not allocate socket, error = 10093

and sometimes 10107 is also logged.

@kqyang kqyang added type: bug Something isn't working correctly and removed needs triage labels Sep 12, 2019
@kqyang
Copy link
Contributor

kqyang commented Sep 12, 2019

@Jason239 Thanks for testing. 10093 is WSANOTINITIALISED. Right now WSAStartup is called only once for all sockets. Looks like we need to call it once for every sockets.

@Korilakkuma You have worked on sockets in Shaka Packager before. Would you be interested in helping us fixing this issue?

@kqyang kqyang added the flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this label Sep 12, 2019
@shaka-bot shaka-bot added this to the v2.4 milestone Sep 12, 2019
@kqyang
Copy link
Contributor

kqyang commented Nov 21, 2019

@Jason239 Let us know if it fixes your problem. Thanks.

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Feb 12, 2020
@shaka-project shaka-project locked and limited conversation to collaborators Feb 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants