zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Install from Musical Artifacts fails and hangs webconf #245

Open sehrgut opened 4 years ago

sehrgut commented 4 years ago

Describe the bug Attempting to install a soundfont from Musical Artifacts fails, and leaves webconf unresponsive. The unzipped soundfont directory contains a suspicious copy of /sys.

To Reproduce Steps to reproduce the behavior:

  1. Go to Library/Presets & Soundfonts
  2. Click on Linux Sampler and select any bank (e.g. SFZ/Pianos)
  3. Search for anything (e.g. "piano")
  4. Click "(+)" for any entry (e.g. "Tiny piano")
  5. Confirm installation

Expected behavior I expected the soundfont to download and install successfully. Instead, webconf hangs indefinitely (installation page never completes, and no new tabs can be opened to zynthian.local) and the unzipped soundfont has obviously-incorrect stuff copied into it.

Setup:

Additional context No loglines are produced for the zynthian-webconf logger during this hang.

root@zynthian:~# journalctl -fu zynthian-webconf
-- Logs begin at Thu 2019-02-14 10:11:58 GMT. --
Aug 10 03:08:49 zynthian systemd[1]: Started Zynthian Webconf.
Aug 10 03:08:53 zynthian zynthian_webconf.sh[452]: error: failed to open file /zynthian/zynthian-plugins/lv2/Surge.lv2/manifest.ttl (No such file or directory)
Aug 10 03:08:53 zynthian zynthian_webconf.sh[452]: lilv_world_load_file(): error: Error loading file `file:///zynthian/zynthian-plugins/lv2/Surge.lv2/manifest.ttl'
Aug 10 03:08:53 zynthian zynthian_webconf.sh[452]: lilv_world_load_bundle(): error: Error reading file:///zynthian/zynthian-plugins/lv2/Surge.lv2/manifest.ttl
Aug 10 03:08:56 zynthian zynthian_webconf.sh[452]: ERROR:root:Failed to configure geometry => no display name and no $DISPLAY environment variable
Aug 10 06:38:27 zynthian zynthian_webconf.sh[452]: /bin/sh: 1: /opt/vc/bin/vcgencmd: not found
Aug 10 06:38:27 zynthian zynthian_webconf.sh[452]: find: ‘/zynthian/zynthian-my-data/presets/puredata/*/*’: No such file or directory

The expanded soundfont dir in /tmp contains a mysterious copy of /sys. This isn't a bad/malicious node in the zip, since manual unzip correctly produces an expanded directory without this.

root@zynthian:~# find /tmp/sig-ex-exp_tiny-piano00___ogg_/sys/ -maxdepth 2
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/config
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/tracing
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/fscache
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/debug
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/profiling
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/uevent_helper
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/notes
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/fscaps
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/slab
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/mm
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/irq
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/security
/tmp/sig-ex-exp_tiny-piano00___ogg_/sys/kernel/cgroup
jofemodo commented 4 years ago

Installing automatically a SFZ is more difficult than expected. I've tried several times to improve the install script by sanitizing the SFZ contents in different ways, but there are still many cases that doesn't work, including some SFZs that doesn't work at all because they use incompatible SFZ2 opcodes ...

You are very welcome to give it a try ... jejeje! There is a lot of room for improving this area!!

sehrgut commented 4 years ago

I'll peek in at that code, then! Maybe something like a patch database for things on Musical Artifacts that there's community interest in would be more reasonable than a universal SFZ-fixer?