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

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

Open
ghost opened this issue Jun 27, 2016 · 5 comments
Open

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

ghost opened this issue Jun 27, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 27, 2016

==> 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
Copy link
Author

ghost commented Jun 27, 2016

@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
Copy link

mati865 commented Jun 27, 2016

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
Copy link
Author

ghost commented Jul 3, 2016

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
Copy link
Author

ghost commented Jul 3, 2016

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
Copy link
Author

ghost commented Jul 4, 2016

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

achadwick added a commit to achadwick/styrene that referenced this issue Oct 22, 2016
Tea-CI can only manage the msys32 shell for styrene right now,
at least until TeaCI/tea-ci#11 is fixed (even breaks "import this!")

We can at least cross-compile for Win64 on msys32!drone, so that's OK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant