TeaCI / tea-ci

Manage issues for tea-ci.org
10 stars 1 forks source link

64 bit Msys2 python fails on Wine with sem_init: Invalid argument #11

Open ghost opened 8 years ago

ghost commented 8 years ago
==> Starting build()...
sem_init: Invalid argument
sem_wait: Invalid argument
sem_wait: Invalid argument
Fatal Python error: PyEval_AcquireThread: non-NULL old thread state

Reference:

  1. https://tea-ci.org/Alexpux/MINGW-packages/947
  2. https://github.com/Alexpux/MINGW-packages/pull/1510#issuecomment-228790905

Not sure if it is related to https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=0aa738220bb9dea2ad479e484560767b36701947

ghost commented 8 years ago

@mati865 do you understand what was python doing? If I have a command line to reproduce the problem I can investigate faster on my local machine.

Thanks!

mati865 commented 8 years ago

I'm not an expert but these errors could be caused by miscompilation, library incompatibility or lack of free RAM.

EDIT: Hmm python2 wasn't downloaded or updated. Is Tea running latest python2 package?

ghost commented 8 years ago

Thank you.

EDIT: Hmm python2 wasn't downloaded or updated. Is Tea running latest python2 package?

Yes, Tea CI has latest Msys2 Python2 package pre-installed in docker image teaci/msys64 and teaci/msys32

I'll take some more time on this issue.

ghost commented 8 years ago

The below code reproduced a similar bug with Cygwin/Msys2 64bit on Wine, but works fine on Windows and 32bit Wine:

#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <semaphore.h>
#include <pthread.h>

int
main(int argc, char *argv[])
{
    sem_t *p_sem = malloc(sizeof(sem_t));

    memset(p_sem, 0xcc, sizeof(sem_t)); /* trigger exception handling code in Cygwin sem_init()-->verifyable_object_isvalid() */
    sem_init(p_sem, 0, 1);

    return 0;
}
ghost commented 8 years ago

I created a bug on Wine Staging: https://bugs.wine-staging.com/show_bug.cgi?id=691