Skip to content

RustDesk Server 1.1.13 (Docker) hbbs code 132 crashes #503

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

Open
Hackerpcs opened this issue Jan 21, 2025 · 17 comments
Open

RustDesk Server 1.1.13 (Docker) hbbs code 132 crashes #503

Hackerpcs opened this issue Jan 21, 2025 · 17 comments
Labels
bug Something isn't working

Comments

@Hackerpcs
Copy link

Describe the bug
After upgrading to latest 1.1.13 server version from docker hub, I get code 132 crashes on hbbs. Reverting to 1.1.12 works around the issue

Describe the environment
docker-compose.yaml: (10.x IP is placeholder)

networks:
  rustdesk-net:
    external: false

services:
  hbbs:
    container_name: hbbs
    ports:
      - 21115:21115
      - 21116:21116
      - 21116:21116/udp
      - 21118:21118
    #image: rustdesk/rustdesk-server:1.1.12
    image: rustdesk/rustdesk-server:latest
    command: hbbs -r 10.10.10.10:21117 -k _
    volumes:
      - ./hbbs:/root
    environment:
      LIMIT_SPEED: 400
      SINGLE_BANDWIDTH: 400
    networks:
      - rustdesk-net
    depends_on:
      - hbbr
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    ports:
      - 21117:21117
      - 21119:21119
    image: rustdesk/rustdesk-server:latest
    command: hbbr -k _
    volumes:
      - ./hbbr:/root
    environment:
      LIMIT_SPEED: 400
      HBBR_SINGLE_BANDWIDTH: 400
      SINGLE_BANDWIDTH: 400
    networks:
      - rustdesk-net
    restart: unless-stopped

Docker logs:

# docker compose -f /foo/docker-compose.yml logs -f

hbbs  | [2025-01-21 05:18:09.747825 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:09.750575 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:09.750602 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:09.752680 +00:00] INFO [libs/hbb_common/src/config.rs:902] Generated new keypair for id:
hbbs  | [2025-01-21 05:18:11.482726 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:11.483096 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:11.483121 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:13.731550 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:13.731683 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:13.731706 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:13.745909 +00:00] INFO [src/rendezvous_server.rs:99] serial=0
hbbs  | [2025-01-21 05:18:13.747344 +00:00] INFO [src/common.rs:45] rendezvous-servers=[]
hbbs  | [2025-01-21 05:18:13.747374 +00:00] INFO [src/rendezvous_server.rs:101] Listening on tcp/udp :21116
hbbs  | [2025-01-21 05:18:13.747387 +00:00] INFO [src/rendezvous_server.rs:102] Listening on tcp :21115, extra port for NAT test
hbbs  | [2025-01-21 05:18:13.747401 +00:00] INFO [src/rendezvous_server.rs:103] Listening on websocket :21118
hbbs  | [2025-01-21 05:18:15.922223 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbr  | [2025-01-21 05:18:08.916217 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbr  | [2025-01-21 05:18:08.916376 +00:00] INFO [src/relay_server.rs:582] Key: foobarbaz
hbbr  | [2025-01-21 05:18:08.916474 +00:00] INFO [src/relay_server.rs:61] #blacklist(blacklist.txt): 0
hbbr  | [2025-01-21 05:18:08.917262 +00:00] INFO [src/relay_server.rs:76] #blocklist(blocklist.txt): 0
hbbs  | [2025-01-21 05:18:15.922318 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:15.922338 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:15.933178 +00:00] INFO [src/rendezvous_server.rs:99] serial=0
hbbs  | [2025-01-21 05:18:15.933403 +00:00] INFO [src/common.rs:45] rendezvous-servers=[]
hbbs  | [2025-01-21 05:18:15.933427 +00:00] INFO [src/rendezvous_server.rs:101] Listening on tcp/udp :21116
hbbs  | [2025-01-21 05:18:15.933441 +00:00] INFO [src/rendezvous_server.rs:102] Listening on tcp :21115, extra port for NAT test
hbbs  | [2025-01-21 05:18:15.933531 +00:00] INFO [src/rendezvous_server.rs:103] Listening on websocket :21118
hbbs  | [2025-01-21 05:18:15.934058 +00:00] INFO [src/rendezvous_server.rs:138] mask: None
hbbs  | [2025-01-21 05:18:15.934080 +00:00] INFO [src/rendezvous_server.rs:139] local-ip: ""
hbbs  | [2025-01-21 05:18:15.934110 +00:00] INFO [src/common.rs:45] relay-servers=["10.10.10.10:21117"]
hbbs  | [2025-01-21 05:18:15.934459 +00:00] INFO [src/rendezvous_server.rs:153] ALWAYS_USE_RELAY=N
hbbs  | [2025-01-21 05:18:15.935281 +00:00] INFO [src/rendezvous_server.rs:185] Start
hbbs  | [2025-01-21 05:18:18.289506 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:18.289565 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:18.289578 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:21.250938 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:21.252362 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:21.252384 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:25.849228 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:25.851058 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:25.851514 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:33.873632 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:33.878016 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:33.878058 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:48.540860 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:18:48.541550 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:18:48.541595 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:18:48.553165 +00:00] INFO [src/rendezvous_server.rs:99] serial=0
hbbs  | [2025-01-21 05:18:48.553221 +00:00] INFO [src/common.rs:45] rendezvous-servers=[]
hbbs  | [2025-01-21 05:18:48.553235 +00:00] INFO [src/rendezvous_server.rs:101] Listening on tcp/udp :21116
hbbs  | [2025-01-21 05:18:48.553247 +00:00] INFO [src/rendezvous_server.rs:102] Listening on tcp :21115, extra port for NAT test
hbbs  | [2025-01-21 05:18:48.553360 +00:00] INFO [src/rendezvous_server.rs:103] Listening on websocket :21118
hbbs  | [2025-01-21 05:19:16.046909 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:19:16.046966 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:19:16.046980 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs  | [2025-01-21 05:19:16.053284 +00:00] INFO [src/rendezvous_server.rs:99] serial=0
hbbs  | [2025-01-21 05:19:16.053841 +00:00] INFO [src/common.rs:45] rendezvous-servers=[]
hbbs  | [2025-01-21 05:19:16.053854 +00:00] INFO [src/rendezvous_server.rs:101] Listening on tcp/udp :21116
hbbs  | [2025-01-21 05:19:16.053859 +00:00] INFO [src/rendezvous_server.rs:102] Listening on tcp :21115, extra port for NAT test
hbbs  | [2025-01-21 05:19:16.053865 +00:00] INFO [src/rendezvous_server.rs:103] Listening on websocket :21118
hbbs  | [2025-01-21 05:19:16.054653 +00:00] INFO [src/rendezvous_server.rs:138] mask: None
hbbs  | [2025-01-21 05:19:16.054844 +00:00] INFO [src/rendezvous_server.rs:139] local-ip: ""
hbbs  | [2025-01-21 05:20:08.965675 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:20:08.966504 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:20:08.966547 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbr  | [2025-01-21 05:18:08.917364 +00:00] INFO [src/relay_server.rs:82] Listening on tcp :21117
hbbr  | [2025-01-21 05:18:08.917376 +00:00] INFO [src/relay_server.rs:84] Listening on websocket :21119
hbbr  | [2025-01-21 05:18:08.917561 +00:00] INFO [src/relay_server.rs:87] Start
hbbr  | [2025-01-21 05:18:08.918563 +00:00] INFO [src/relay_server.rs:105] DOWNGRADE_THRESHOLD: 0.66
hbbr  | [2025-01-21 05:18:08.918592 +00:00] INFO [src/relay_server.rs:115] DOWNGRADE_START_CHECK: 1800s
hbbr  | [2025-01-21 05:18:08.918607 +00:00] INFO [src/relay_server.rs:125] LIMIT_SPEED: 400Mb/s
hbbr  | [2025-01-21 05:18:08.918620 +00:00] INFO [src/relay_server.rs:136] TOTAL_BANDWIDTH: 1024Mb/s
hbbr  | [2025-01-21 05:18:08.918633 +00:00] INFO [src/relay_server.rs:146] SINGLE_BANDWIDTH: 400Mb/s
hbbs exited with code 132
hbbs  | [2025-01-21 05:22:12.608414 +00:00] INFO [src/rendezvous_server.rs:99] serial=0
hbbs  | [2025-01-21 05:22:12.608786 +00:00] INFO [src/common.rs:45] rendezvous-servers=[]
hbbs  | [2025-01-21 05:22:12.608802 +00:00] INFO [src/rendezvous_server.rs:101] Listening on tcp/udp :21116
hbbs  | [2025-01-21 05:22:12.608814 +00:00] INFO [src/rendezvous_server.rs:102] Listening on tcp :21115, extra port for NAT test
hbbs  | [2025-01-21 05:22:12.608974 +00:00] INFO [src/rendezvous_server.rs:103] Listening on websocket :21118
hbbs  | [2025-01-21 05:22:12.609351 +00:00] INFO [src/rendezvous_server.rs:138] mask: None
hbbs  | [2025-01-21 05:22:12.609460 +00:00] INFO [src/rendezvous_server.rs:139] local-ip: ""
hbbs  | [2025-01-21 05:22:12.609829 +00:00] INFO [src/common.rs:45] relay-servers=["10.10.10.10:21117"]
hbbs  | [2025-01-21 05:22:12.610981 +00:00] INFO [src/rendezvous_server.rs:153] ALWAYS_USE_RELAY=N
hbbs  | [2025-01-21 05:22:12.611887 +00:00] INFO [src/rendezvous_server.rs:185] Start
hbbs exited with code 132
hbbs  | [2025-01-21 05:23:14.504878 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519
hbbs  | [2025-01-21 05:23:14.504930 +00:00] INFO [src/rendezvous_server.rs:1205] Key: foobarbaz
hbbs  | [2025-01-21 05:23:14.504940 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs exited with code 132
hbbs exited with code 132
hbbs exited with code 132

Arch Linux host OS on the VPS

@Hackerpcs Hackerpcs added the bug Something isn't working label Jan 21, 2025
@21pages
Copy link
Contributor

21pages commented Jan 21, 2025

Can't reproduce with arch linux, same docker-compose.yaml, could you provide more informations on your environment?

Will it crash if running https://github.com/21pages/rustdesk-server/releases/download/test/hbbs on your host?

@21pages
Copy link
Contributor

21pages commented Jan 22, 2025

Could you help to debug this problem?

  1. Stop the original container, cd path/to/docker-compose.yaml, docker-compose down
  2. Copy your original directory, cp -r rustdesk-server rustdesk-server-debug
  3. cd rustdesk-server-debug, change rustdesk/rustdesk-server to 21pages/rustdesk-server in the docker-compose.yaml
  4. docker-compose up -d
  5. Show the log, docker-compose logs -f hbbs

@xlionjuan
Copy link
Contributor

Remove all envs for your hbbs, they are not doing anything for hbbs, though I think it is not the problem

Also try remove all args for hbbs, like command: hbbs

@xlionjuan
Copy link
Contributor

Might be related: aptos-labs/aptos-core#1019

After some search, I found multiple results mentioned "CPU Instruction"

What is the result when running this?

sudo cat /proc/cpuinfo | grep avx

@dimmuboy
Copy link

I have same issue because I'm trying to run it on VPS. Your command @xlionjuan returns nothing, so probably it's not possible to run it on this machine.

@xlionjuan
Copy link
Contributor

@dimmuboy What is the output of the

sudo cat /proc/cpuinfo

@dimmuboy
Copy link

dimmuboy commented Mar 2, 2025

@dimmuboy What is the output of the

sudo cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : QEMU Virtual CPU version 1.5.3
stepping        : 3
microcode       : 0x1
cpu MHz         : 1695.747
cache size      : 4096 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 hypervisor lahf_lm pti
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi
bogomips        : 3391.49
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

@xlionjuan
Copy link
Contributor

xlionjuan commented Mar 3, 2025

A VPS without AVX support is crazy, I guess some code or dependencies in hbbs utilizes AVX.

@Hackerpcs
Copy link
Author

Hackerpcs commented Mar 3, 2025

Mine doesn't have it too. 1.1.12 continues to work normally

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : QEMU Virtual CPU version 2.1.2
stepping        : 3
microcode       : 0x1000065
cpu MHz         : 2099.998
cache size      : 512 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl cpuid tsc_known_freq pni cx16 x2apic popcnt hypervisor lahf_lm svm abm sse4a 3dnowprefetch vmmcall
bugs            : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips        : 4199.99
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : QEMU Virtual CPU version 2.1.2
stepping        : 3
microcode       : 0x1000065
cpu MHz         : 2099.998
cache size      : 512 KB
physical id     : 1
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl cpuid tsc_known_freq pni cx16 x2apic popcnt hypervisor lahf_lm svm abm sse4a 3dnowprefetch vmmcall
bugs            : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips        : 4199.99
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

@xlionjuan
Copy link
Contributor

Recommend to ask VPS provider

@dimmuboy
Copy link

dimmuboy commented Mar 4, 2025

Recommend to ask VPS provider

Thanks, I decided to migrate to different provider. Contabo looks good fine for me 🙂

@navhaxs
Copy link

navhaxs commented Mar 24, 2025

Sorry to +1, but me too.

Noticing that we all have QEMU Virtual CPU. Seems that QEMU guests do not include AVX extension by default. So, this would affect a lot of users who are with VPS providers using this same virtualisation technology.

I think it would be nice if rustdesk server does not solely rely on AVX :)

In the meantime I've just asked my own VPS provider about AVX support, will see...

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 13
model name      : QEMU Virtual CPU version 1.5.3
stepping        : 3
microcode       : 0x1000065
cpu MHz         : 3493.436
cache size      : 512 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl cpuid tsc_known_freq pni cx16 hypervisor lahf_lm svm abm sse4a 3dnowprefetch vmmcall
bugs            : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips        : 6986.87
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management:

...

@navhaxs
Copy link

navhaxs commented Mar 24, 2025

My VPS provider support was very quick and were able to enable AVX on my instance 👍🏼. I recommend anyone seeing this issue to try contact their VPS provider.

@xlionjuan
Copy link
Contributor

@navhaxs This is not QEMU's problem, it is all on the provider, without AVX support is not acceptable no matter what.

@navhaxs
Copy link

navhaxs commented Mar 25, 2025

@xlionjuan Yeah it is unfortunate. I just mean that you should expect to see many more people also run into this crash due to their VPS provider 🙁

The default QEMU guest CPU config does NOT have AVX https://superuser.com/questions/453786/how-do-i-get-avx-support-in-qemu. I just tested a simple VM on my other Proxmox server, which is also QEMU-based, and can confirm this.

Maybe a error message can be added, like how MongoDB does it? That would help future users :)
https://reddit.com/r/homelab/comments/yvo4jm/how_do_i_enable_avx_on_my_server/

@Hackerpcs
Copy link
Author

Question is, is there a feature that was added in 1.1.13 and above that doesn't work without AVX and is now required? From the releases I see on 1.1.13 just "Version check and refactor hbb_common to share with rustdesk client" and on 1.1.14 "Fix windows crash"

@xlionjuan
Copy link
Contributor

I'm guessing it is related to Rust lang itself, but I can't sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants