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

RaySession 0.13.0 hangs on Fedora 37 #152

Closed
ycollet opened this issue Dec 18, 2022 · 16 comments
Closed

RaySession 0.13.0 hangs on Fedora 37 #152

ycollet opened this issue Dec 18, 2022 · 16 comments

Comments

@ycollet
Copy link

ycollet commented Dec 18, 2022

I am trying to start RaySession 0.13.0 on Fedora 37 and it hangs at startup.
I started Rayssion in debug mode and got this trace:

$ raysession -d
OSC::daemon sends ('/ray/gui/server/announce', '0.13.0', 0, 492, '/home/collette/Ray Sessions', 1)
OSC::daemon sends ('/ray/gui/server/status', 0)
OSC::daemon sends ('/ray/gui/session/name', '', '')
OSC::daemon sends ('/ray/gui/session/notes', '')
OSC::daemon sends ('/ray/gui/patchbay/fast_temp_file_memory', '/tmp/tmp5__43sn2')
OSC::daemon sends ('/ray/gui/server/recent_sessions',)
OSC::daemon sends ('/ray/gui/server/message', 'le démon tourne sur osc.udp://localhost:16188/')
[ray-daemon]GUI connected at osc.udp://localhost:12287/
[ray-daemon]URL : osc.udp://192.168.1.92:16188/
[ray-daemon]      osc.udp://localhost:16188/
[ray-daemon]ROOT: /home/collette/Ray Sessions
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
OSC::gui sends ('/ray/server/list_sessions', 1)
OSC::gui sends ('/ray/server/list_session_templates',)
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
OSC::gui sends ('/ray/server/new_session', 'TuxGuitar', '///with_jack_patch')
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'

OSC::gui sends ('/ray/server/list_sessions', 0)
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
`` `
@ycollet
Copy link
Author

ycollet commented Dec 18, 2022

And without debug mode:

Connexion de l'IGU au port ray-daemon existant 16187
Error: server did not reply, it may be busy !

@ycollet
Copy link
Author

ycollet commented Dec 18, 2022

Started ray-daemon manually on a fixed port and started raysession using this port and got these messages on the deamon console:

$ ray-daemon -p 16189
[ray-daemon]URL : osc.udp://192.168.1.92:16189/
[ray-daemon]      osc.udp://localhost:16189/
[ray-daemon]ROOT: /home/collette/Ray Sessions reseau
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'
AttributeError: module 'inspect' has no attribute 'getargspec'
Exception ignored in: 'liblo._msg_callback'
AttributeError: module 'inspect' has no attribute 'getargspec'

@Houston4444
Copy link
Owner

The problem seems to come from liblo or pyliblo. What is the python version ?

@ycollet
Copy link
Author

ycollet commented Dec 18, 2022

I've got these information related to pyliblo:

$ dnf info python3-pyliblo
Microsoft Teams                                                                                                                                                                                              11 kB/s | 3.0 kB     00:00    
teams                                                                                                                                                                                                        15 kB/s | 3.0 kB     00:00    
Paquets installés
Nom          : python3-pyliblo
Version      : 0.10.0
Publication  : 24.fc37
Architecture : x86_64
Taille       : 240 k
Source       : pyliblo-0.10.0-24.fc37.src.rpm
Dépôt        : @System
Depuis le dé : fedora
Résumé       : Python bindings for the liblo OSC library
URL          : http://das.nasophon.de/pyliblo/
Licence      : GPLv2+
Description  : pyliblo is a Python wrapper for the liblo Open Sound Control library.
             : It supports almost the complete functionality of liblo, allowing you
             : to send and receive OSC messages using a nice and simple Python API.
             : 
             : Also included are the command line utilities send_osc and dump_osc.

And for liblo

Nom          : liblo
Version      : 0.31
Publication  : 6.fc37
Architecture : x86_64
Taille       : 185 k
Source       : liblo-0.31-6.fc37.src.rpm
Dépôt        : @System
Depuis le dé : fedora
Résumé       : Open Sound Control library
URL          : http://liblo.sourceforge.net
Licence      : LGPLv2+
Description  : liblo is an implementation of the Open Sound Control protocol for
             : POSIX systems developed by Steve Harris.

@Houston4444
Copy link
Owner

hummm, I use the same versions.

@Houston4444
Copy link
Owner

No problem with other soft using liblo ? New-Session-Manager for example, there is also carla using pyliblo, but it's not easy to use carla-control (which communicates with carla with pyliblo).

@ycollet
Copy link
Author

ycollet commented Dec 18, 2022

Looking at SELinux ... Something has been changed. You can't disable SELinux temporarily. Maybe a SELinux option control the port

@ycollet
Copy link
Author

ycollet commented Dec 18, 2022

Not related to SELinux.
I installed non session manager and nsm works fine.
I think the problem started with RaySession 0.12.0.

@ycollet
Copy link
Author

ycollet commented Dec 18, 2022

Looks like the inspect python module is not yet python3.11 ready ...
pyinvoke/invoke#833

@Houston4444
Copy link
Owner

RaySession doesn't use inspect module itself (normally, I sometimes use it when I am debugging if I feel really lost ;)). So it probably comes from pyliblo. pyliblo uses cython (and not python directly).
That said, there is a big problem with pyliblo, it is not maintained anymore, I made this PR dsacre/pyliblo#27 some months ago, and no answer, then I sent a email, no answer...
Very few programs use it now (RaySession, Carla, maybe others but not sure).
I think I will have to fork it and maintain it, it would be maybe less job than adapt RS to an alternative.

That said, I know I can simply try to run it with python3.11, and see.

@Houston4444
Copy link
Owner

Ok, I reproduce the error !

@Houston4444
Copy link
Owner

I found the issue. It's here : https://github.com/dsacre/pyliblo/blob/master/src/liblo.pyx#L270
getargspec = (_inspect.getargspec if PY_VERSION_HEX < 0x03000000 else _inspect.getfullargspec)

I didn't know that but in this form ( var = X if condition else Y ), X is evaluated even if the condition is False, here _inspect.getargspec is evaluated, but it doesn't exists, and it raises an error.

a working solution:

if PY_VERSION_HEX < 0x03000000:
    getargspec = _inspect.getargspec
else:
    getargspec = _inspect.getfullargspec

but continue to manage python2 is overrated now.

@ycollet
Copy link
Author

ycollet commented Dec 19, 2022

Happy you were able to reproduce the bug !
And thanks a lot for the var = X evaluated despite the condition is false ... Quite interesting.

@Houston4444
Copy link
Owner

Good new, pyliblo has already been forked, and this fork works with python3.11 .
The fork is here: https://github.com/gesellkammer/pyliblo3 , but you can simply install it with
python3 -m pip install pyliblo3

We need to ask packagers to change their base project for this python lib.

@ycollet
Copy link
Author

ycollet commented Dec 22, 2022

Excellent, I will make a package on my own repo and make raysession depends on it. Thanks a lot !

@ycollet
Copy link
Author

ycollet commented Dec 30, 2022

Works fine with the pyliblo fork.
I close the ticket. Thanks for your help !

@ycollet ycollet closed this as completed Dec 30, 2022
s0600204 pushed a commit to s0600204/pyliblo that referenced this issue Jan 2, 2025
Apparently some combination of python 3.11 and cython [0.29?] doesn't handle
the one-liner correctly, causing the `X` in `X if Y else Z` to be resolved even
when Y was False.

I (s0600204) never had this problem, hence the "apparently".

It could be that the users reporting the problem were using the release version
of 0.10.0, which doesn't have the one-liner, and thus always uses the defunct
`_inspect.getargspec`, causing the issue.

See also:
* dsacre#29
* Houston4444/RaySession#152 (comment)
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

2 participants