netkit-jh / netkit-jh-build

Build scripts for the kernel, filesystem and assisting scripts/programs for Netkit-JH.
https://netkit-jh.github.io/
GNU General Public License v3.0
22 stars 12 forks source link

`vdump` returns "not enough byte received or error: 0" #59

Closed AdamBromiley closed 3 years ago

AdamBromiley commented 3 years ago

Describe the bug Running vdump <cd_name> errors with not enough byte received or error: 0 and exits. The same error occurs by invoking uml_dump directly with uml_dump .netkit/hubs/cd_name.cnct. It can be traced back to line 205 of core/src/uml_dump/uml_dump.c:

  /* receive the data out socket addr (we don't really care about it) */
  struct sockaddr_un data_out_sun;

  n = recv(connect_fd, &data_out_sun, sizeof(data_out_sun), 0); 

  if(n < sizeof(data_out_sun)) {
    fprintf(stderr,"not enough byte received or error: %d\n", n);
    exit(1);
  }

However since this file has not been changed by us (and it works in previous versions of Netkit-JH and in Netkit-NG) the issue probably lies somewhere else.

To Reproduce Steps to reproduce the behavior:

  1. Run vdump <cd_name>
  2. See error
TechSupportJosh commented 3 years ago

Caused by 1cd3a109ad646309e6b4ca5a0fae4951d80a323c - uml_switch had extra additions which supported the uml_dump functionality.

TechSupportJosh commented 3 years ago

Fixed in PR #65