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

sonic-pi: 2.9.0 -> 3.0.1 #30131

Merged
merged 1 commit into from Oct 7, 2017
Merged

sonic-pi: 2.9.0 -> 3.0.1 #30131

merged 1 commit into from Oct 7, 2017

Conversation

kamilchm
Copy link
Member

@kamilchm kamilchm commented Oct 5, 2017

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Oct 6, 2017

What else do I need to test this? Currently it is outputting this error message:

Sonic Pi Boot Error Report

System Information

  • Sonic Pi version: 3.0.1
  • OS: NixOS 18.03.git.5ed6372 (Impala)

GUI Log

/home/joerg/.sonic-pi/log/gui.log

[GUI] - Detecting port numbers...
[GUI] - GUI OSC listen port 4558
[GUI] -    port: 4558 [OK]
[GUI] - Server OSC listen port 4557
[GUI] -    port: 4557 [OK]
[GUI] - Server incoming OSC cues port 4559
[GUI] -    port: 4559 [OK]
[GUI] - Scsynth port 4556
[GUI] -    port: 4556 [OK]
[GUI] - Server OSC out port 4558
[GUI] - GUI OSC out port 4557
[GUI] - Scsynth send port 4556
[GUI] - Erlang router port 4560
[GUI] -    port: 4560 [OK]
[GUI] - OSC MIDI out port 4561
[GUI] -    port: 4561 [OK]
[GUI] - OSC MIDI in port 4562
[GUI] -    port: 4562 [OK]
[GUI] - Init script completed
[GUI] - using default editor colours
[GUI] - launching Sonic Pi Server:
[GUI] - starting UDP OSC Server on port 4558...
[GUI] - UDP OSC Server ready and listening
[GUI] - Ruby server pid registered: 19298
[GUI] - waiting for Sonic Pi Server to boot...
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...
[GUI] - UDP OSC Server no longer listening

Server Errors

/home/joerg/.sonic-pi/log/server-errors.log

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
terminate called without an active exception

Server Output

/home/joerg/.sonic-pi/log/server-output.log

Sonic Pi server booting...
Using protocol: udp
Detecting port numbers...
Send port: 4558
Listen port: 4557
  - OK
Scsynth port: 4556
  - OK
Scsynth send port: 4556
  - OK
OSC cues port: 4559
  - OK
Erlang port: 4560
  - OK
OSC MIDI out port: 4561
  - OK
OSC MIDI in port: 4562
  - OK
Booting server...


Booting Sonic Pi
----------------

Booting on Linux
Jackd not running on system. Starting...
Boot - Starting the SuperCollider server...
Boot - scsynth -u 4556 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096
Started [19334] [-] scsynth -u 4556 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096 [-] /run/user/1000/sonic-pi-pids/19334
Failed to start server: SIGTERM
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/util.rb:553:in `wait'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/util.rb:553:in `kill_and_deregister_process'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:224:in `rescue in boot_and_wait'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:221:in `boot_and_wait'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:382:in `boot_server_linux'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:151:in `boot'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:37:in `initialize'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/server.rb:77:in `new'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/server.rb:77:in `initialize'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/studio.rb:183:in `new'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/studio.rb:183:in `init_scsynth'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/studio.rb:56:in `initialize'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/lang/sound.rb:125:in `new'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/server/sonicpi/lib/sonicpi/lang/sound.rb:125:in `block (2 levels) in included'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/gui/qt/../../../app/server/bin/sonic-pi-server.rb:177:in `new'
/nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/gui/qt/../../../app/server/bin/sonic-pi-server.rb:177:in `<main>'
Server is exiting.
Shutting down GUI...
Goodbye :-)

Scsynth Output

/home/joerg/.sonic-pi/log/scsynth.log

# Starting SuperCollider 2017-10-06 09:18:33
could not initialize audio.

Process Log

/home/joerg/.sonic-pi/log/processes.log



Clearing pids: []
No pids to clear :-)
Started [19298] [-] ruby -E utf-8 /nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/gui/qt/../../../app/server/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /run/user/1000/sonic-pi-pids/19298
Started [19334] [-] scsynth -u 4556 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096 [-] /run/user/1000/sonic-pi-pids/19334


Clearing pids: ["19334", "19298"]

Clearing [19334]
  -- command scsynth -u 4556 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096
  -- removing /run/user/1000/sonic-pi-pids/19334

Clearing [19298]
  -- command ruby -E utf-8 /nix/store/m9pgl3ayjfdfiqia68dvd8c61hjkrfv2-sonic-pi-3.0.1/app/gui/qt/../../../app/server/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562
  -- removing /run/user/1000/sonic-pi-pids/19298
  -- politely killing 19298



@kamilchm
Copy link
Member Author

kamilchm commented Oct 6, 2017

sonic-pi needs jackd started. You can do it by running pasuspender -- jackd -R -d alsa. See https://github.com/samaaron/sonic-pi/blob/master/INSTALL-LINUX.md#running

We could replace the command in https://github.com/samaaron/sonic-pi/blob/dbc45c400a748fb0bceb235b02bf7d808f3b4c57/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb#L376
What do you think?

@Mic92
Copy link
Member

Mic92 commented Oct 6, 2017

Maybe adding jackd to the PATH of sonic-pi would help.
Does jackd need something other privileges to start?

**[nix-shell:/tmp/nox-review-je2_gdlp]$ pasuspender -- jackd -R -d alsa
jackdmp 1.9.11-RC1
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only
mode
Released audio card Audio0
audio_reservation_finish
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server

@kamilchm
Copy link
Member Author

kamilchm commented Oct 6, 2017

jackd is added to PATH in https://github.com/NixOS/nixpkgs/pull/30131/files#diff-45e93847b5b5683d70e6655296434353R86
What I suspect from sonic-pi running instruction is that if you run pulseaudio you need to allow jackd to use a soundcard with pasuspender.

@Mic92 Mic92 merged commit 2a0264e into NixOS:master Oct 7, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants