genodelabs / genode-world

Collection of community-maintained components for Genode
Other
44 stars 46 forks source link

vnc_server : "attempt to allocate zero size block from heap" #328

Closed ttcoder closed 1 year ago

ttcoder commented 1 year ago

(is genode-world the proper place for reporting vnc_server issues?)

(edit) I've added tracing in vnc_output.h and verified (by dumping its value) that the size passed to the allocator on screen resolution change is indeed 0, at least at the beginning. (and the Area returned by 'capture' is 0-0 pixels).

As discussed on the mailing-list. I can work-around that by 1) adding an _area = Area(320,200) in the vnc_output.h header to make sure the alloc is bigger than zero bytes -- but there's probably a better way to fix that -- and 2) setting the "width" and "height" attributes of the "config" tag to non-zero values.

Attaching a somewhat reduced config file that replicates the issue for me ; it's still fairly big, but you can probably strip it down of most everything and still replicate the bug.

ttcoder commented 1 year ago

Here's the tail-end of the log:

[init -> vnc_server] INFO:      device=eth0, len=6 hwaddr=02:02:02:02:02:01, ipaddr=10.0.3.11, mask=255.255.255.0 , gw=10.0.3.1
[init -> vnc_server] INFO:      host=11f5204I4, domain=, nis-domain=
[init -> vnc_server] INFO:      bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
[init -> vnc_server] Error: attempt to allocate zero-size block from heap
[init -> vnc_server] Error: Uncaught exception of type 'Genode::Ram_allocator::Denied'
[init -> vnc_server] Warning: abort called - thread: ep
ttcoder commented 1 year ago

config.txt

... renamed to config.txt as github complains about the lack of filename extension.

EDIT: that's all with Genode 22.11, and vnc_server either compiled locally or downloaded from depot.genode.org .

EDIT2: and it's reproducible both on hardware and in qemu.

chelmuth commented 1 year ago

(is genode-world the proper place for reporting vnc_server issues?)

I don't mind you use this issue tracker. @jschlatow's repo can be found at https://github.com/jschlatow/goa-pkgs.

jschlatow commented 1 year ago

@ttcoder I have pushed a fix for the vnc_server (commit jschlatow/goa-pkgs@e7d96d3) to my goa-pkgs repo. Can you give it a try?

ttcoder commented 1 year ago

@jschlatow applied and tested, it works for me in Qemu, thank you!

I will upgrade to the newer Genode rev in a few days, and I'll also remember to look for a new vnc_server binary on depot.genode.org/jschlatow and then I can get rid of my temporary source 'fork'. Though this ticket can be closed right away if needed.