petronetto / pytorch-alpine

A very small PyTorch container in Alpine Linux
https://hub.docker.com/r/petronetto/pytorch-alpine
BSD 3-Clause "New" or "Revised" License
66 stars 6 forks source link

Exception in Thread: ValueError: signal number 32 out of range #3

Open czardien opened 6 years ago

czardien commented 6 years ago

Hey,

Great job on that image 👍 I'm using to follow the official PyTorch tutorial and I ran into an unexpected error ; for some reason I'm confident it's because the application lives in that alpine environment.

The specific tutorial that raises an issue for me is the training a classifier (https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html), the specific line is dataiter = iter(trainloader) and the error is:

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/multiprocessing/resource_sharer.py", line 139, in _serve
    signal.pthread_sigmask(signal.SIG_BLOCK, range(1, signal.NSIG))
  File "/usr/lib/python3.6/signal.py", line 60, in pthread_sigmask
    sigs_set = _signal.pthread_sigmask(how, mask)
ValueError: signal number 32 out of range

I will attach more details soon.

petronetto commented 6 years ago

Hi @Idraen!

Thanks for your help! I'll fix it ASAP. If you need another container with PyTorch, I also have this one, is a little bit larger, but have all packages.

Bests

czardien commented 6 years ago

Oh man thanks for getting back to me ; I just realised I forgot to attach more details 🙈 Find below some screenshots of what's going on. Although my initial description is pretty self-explanatory. That third screenshot helps to pinpoint the exact line that raises the issue.

I'll take a look at that other image of yours thanks ; I'm currently relying on that other one (https://github.com/stepankuzmin/pytorch-notebook) and that ValueError isn't raised so I'm quite happy. However I'm really sad because it's 54 layers and 2.4GB ☚ī¸

I'm really confused about that error ; googling that in a rush doesn't help too much. Anyway let me know if you have any question!

Cheers,

screen shot 2018-07-25 at 14 06 05 screen shot 2018-07-25 at 14 06 32 screen shot 2018-07-25 at 14 08 24
czardien commented 6 years ago

Hi @petronetto, FYI I confirm that using your other image (https://github.com/petronetto/docker-python-deep-learning) I am able to run the code above without raising any exception 👍 Great job on that image!

Cheers buddy

ssafar commented 4 years ago

Looks like this was a Python bug, fixed as of 3.6.6. (... see https://stackoverflow.com/questions/53300965/pytorch-exception-in-thread-valueerror-signal-number-32-out-of-range/58861719#58861719 for more details!)