google / gemmlowp

Low-precision matrix multiplication
Apache License 2.0
1.77k stars 450 forks source link

[BUG] Failed to build on several architectures #136

Closed cdluminate closed 5 years ago

cdluminate commented 6 years ago

Overview: https://buildd.debian.org/status/package.php?p=gemmlowp&suite=experimental

Failed on i386 https://buildd.debian.org/status/fetch.php?pkg=gemmlowp&arch=i386&ver=0%7E20180308-gf59a96b-1&stamp=1527673668&raw=0

Failed on armel https://buildd.debian.org/status/fetch.php?pkg=gemmlowp&arch=armel&ver=0%7E20180308-gf59a96b-1&stamp=1527747448&raw=0

mips https://buildd.debian.org/status/fetch.php?pkg=gemmlowp&arch=mips&ver=0%7E20180308-gf59a96b-1&stamp=1527656602&raw=0

powerpc https://buildd.debian.org/status/fetch.php?pkg=gemmlowp&arch=powerpc&ver=0%7E20180308-gf59a96b-1&stamp=1527657665&raw=0

The errors look the same:

E: Build killed with signal TERM after 150 minutes of inactivity

Deadlock triggered in test_blocking_counter?

bjacob commented 6 years ago

thanks for the report. this test seems to work fine when I run it locally. I would welcome patches making it work also for buildd.debian.org.

AdrianBunk commented 6 years ago

Note that the failure pattern is "test hangs on 32bit architectures".

alexfru commented 6 years ago

We've recently looked at what looked like a hang on a futex in this test and the conclusion is

insufficient user memory space, because test (indirectly) tries to map more than 2GB. Test program tries to create hundreds of threads and each thread has stack of 8MB (default size for MIPS). After ~250 threads have been created, whole user address space is mapped and next call to pthread_create() fails, which isn't handled by test. As a consequence of this, main thread stays blocked, waiting indefinitely for signal. Other 32-bit architectures have smaller stack size (by default), and have enough address space. Possible solution is to use smaller stack size for the threads, and to check return value of pthread_create().

bjacob commented 6 years ago

Thanks for debugging that, and sorry about the trouble. I'd gladly take a PR fixing this however way works for you, including if it lowers test coverage by lowering the number of threads / cases being covered.

cdluminate commented 6 years ago

Interestingly hurd-i386 can build and pass the test: https://buildd.debian.org/status/package.php?p=gemmlowp