vtm icon indicating copy to clipboard operation
vtm copied to clipboard

New versions (0.9.99.56/7) crashes

Open mlopezgva opened this issue 1 year ago • 13 comments

Hello!

v.0.9.99.[67] throws a core-dump. v0.9.99.5 works fine

I've tried the x86 and the x86_64 zip releases.

System:

 Distro: Linux Mint 21.3 Virginia
   base: Ubuntu 22.04 jammy
 Kernel: 5.15.0-126-generic x86_64
Desktop: Cinnamon 6.0.4
        tk: GTK 3.24.33
        wm: muffin vt: 7
        dm: LightDM 1.30.0

Machine:

Type: Laptop System: ASUSTeK product: ZenBook UX431DA_UM431DA v: 1.0
Mobo: ASUSTeK model: UX431DA v: 1.0
UEFI: American Megatrends
   v: UX431DA.300
date: 07/16/2019

Error in kern.log:

traps: vtm[3385393] trap divide error ip:7fa6978aebb9 sp:7ffcc7f80e00 error:0 in libc.so.6[7fa697761000+195000]

Execution output.

If you need anything else, just ask.

❯ vtm
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
[1]    3385995 floating point exception (core dumped)  vtm

I've tried with three terminals (qterminal, wezterm and kitty), just in case...

mlopezgva avatar Dec 18 '24 14:12 mlopezgva

Thanks, I'll try to reproduce it and fix it.

o-sdn-o avatar Dec 18 '24 15:12 o-sdn-o

I can't reproduce this issue on a clean install of Linux Mint 21.3. Could you please provide your vtm settings.xml or $VTM_CONFIG envvar value if any of them are used?

  • ~/.config/vtm/settings.xml
  • /etc/vtm/settings.xml

o-sdn-o avatar Dec 19 '24 06:12 o-sdn-o

I can't reproduce this issue on a clean install of Linux Mint 21.3. Could you please provide your vtm settings.xml or $VTM_CONFIG envvar value if any of them are used?

  • ~/.config/vtm/settings.xml
  • /etc/vtm/settings.xml

I have none of these. Which I suppose means it is using the defaults. :-) I'll try the new v.58 in a few (a couple of) hours.

mlopezgva avatar Dec 19 '24 16:12 mlopezgva

There are also cases like this:

https://randomascii.wordpress.com/2012/04/21/exceptional-floating-point/

There have been various instances in the past (printer drivers from a manufacturer who shall not be named) that would enable floating-point exceptions and leave them enabled, meaning that some perfectly legitimate software would start crashing after calling into third-party code (such as after printing). Having somebody’s hapless code crash after calling a function in your code is a horrible experience, so be particularly careful if your code may end up injected into other processes. In that situation you definitely need to not leave floating-point exceptions enabled when you return, and you may need to be tolerant of being called with floating-point exceptions enabled.

o-sdn-o avatar Dec 20 '24 08:12 o-sdn-o

Tried v0.9.99.61 and it still crashes. :-(

mlopezgva avatar Dec 30 '24 08:12 mlopezgva

Well, I will investigate further.

o-sdn-o avatar Dec 30 '24 08:12 o-sdn-o

Well compiling from source produces a working binary.. Also, a tarball inside a ZIP is kind of a strange artifact format 😆

eMPee584 avatar Jan 01 '25 14:01 eMPee584

It looks like FPU errors are a consequence of static linking.

o-sdn-o avatar Jan 01 '25 14:01 o-sdn-o

a tarball inside a ZIP is kind of a strange artifact format

Artifacts are created using Github Actions (tar is created using 7zip, and the final zip is done by Github.):

https://github.com/directvt/vtm/blob/3223a4e3e0dedb231cc1d6faf9adfafb908e68f3/.github/workflows/build.yml#L102-L104

o-sdn-o avatar Jan 01 '25 14:01 o-sdn-o

I think I found the cause of the crash. The problems started after c8e011e42f0ac5a028080a368137032d0d3ece5d. There, dynamic libc.so calls are apparently used. This was a stub for future X11 support. I can remove this code and everything will work (this is my assumption). In the future, I will have to come up with something to workaround this and to support X11 with static linking.

o-sdn-o avatar Jan 01 '25 16:01 o-sdn-o

Hi!

Sorry to announce it, but...

❯ vtm --version
v0.9.99.62                                                                                                                                                                                                                                                                 /0,0s
❯ vtm
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
[3]    1105947 floating point exception (core dumped)  vtm

:/

mlopezgva avatar Mar 01 '25 00:03 mlopezgva

1105947 floating point exception (core dumped) vtm

I'll investigate further. We may have to abandon static linking.

o-sdn-o avatar Mar 01 '25 04:03 o-sdn-o

I need more clues. Could you please test how the following commands behave?

  • Start desktop server:
    vtm -s
    
  • Start log monitor:
    vtm -m
    
    • If the launch was successful, run vtm -s in another (parallel) terminal window/tab.
  • Start standalone terminal:
    vtm -r term
    
  • List current config:
    vtm -l
    
  • Run desktop server in background:
    vtm -d
    
  • Start demo app:
    vtm -r calc
    
  • Run vtm on custom pipe:
    vtm -p p
    
  • Run bare tty:
    vtm -r
    

Expected output:

sdn@sdn-Virtual-Machine:/$ vtm -s
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -s
apps: Loading settings from "/etc/vtm/settings.xml"...
      Not found
apps: Loading settings from "/home/sdn/.config/vtm/settings.xml"...
      Not found
auth: Rendering refresh rate: 60 fps
main: Session started
      user: sdn@sdn-Virtual-Machine
      pipe: vtm-1000
 tty: Pseudoterminal /dev/pts/0

sdn@sdn-Virtual-Machine:/$ vtm -m
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -m
main: Waiting for server...
 tty: Pseudoterminal /dev/pts/0

sdn@sdn-Virtual-Machine:/$ vtm -r term
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -r term
apps: Loading settings from "/etc/vtm/settings.xml"...
      Not found
apps: Loading settings from "/home/sdn/.config/vtm/settings.xml"...
      Not found
Terminal Console v0.9.99.70
sdn@sdn-Virtual-Machine:/$ 

sdn@sdn-Virtual-Machine:/$ vtm -l
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -l
apps: Loading settings from "/etc/vtm/settings.xml"...
      Not found
apps: Loading settings from "/home/sdn/.config/vtm/settings.xml"...
      Not found
Resultant settings:
  1: <!-- Ordered list of paths to settings files. -->
  2: <!-- <file*/>  Specify a new list and clear previously defined sources. -->
  3: <!-- <file="/path/to/settings.xml"/> The settings (the <config> subsection only) will be loaded and overlayed in the specified order. -->
  4: <file*/>  <!-- Clear previously defined sources. Start a new list. -->
  5: <file="/etc/vtm/settings.xml"/>        <!-- Default system-wide settings source. The "/etc/..." path will be auto converted to the "%PROGRAMDATA%\..." on Windows. -->
  6: <file="~/.config/vtm/settings.xml"/>   <!-- Default user-wise settings source. -->
  7: <config>  <!-- App configuration. -->
  8:     <gui>  <!-- GUI mode related settings. (win32 platform only for now) -->
  9:         <antialiasing=on/>   
  ... 

sdn@sdn-Virtual-Machine:/$ vtm -d
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -d
apps: Loading settings from "/etc/vtm/settings.xml"...
      Not found
apps: Loading settings from "/home/sdn/.config/vtm/settings.xml"...
      Not found
  os: Process forked
sdn@sdn-Virtual-Machine:/$ 

sdn@sdn-Virtual-Machine:/$ vtm -r calc
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -r calc
apps: Loading settings from "/etc/vtm/settings.xml"...
      Not found
apps: Loading settings from "/home/sdn/.config/vtm/settings.xml"...
      Not found
Spreadsheet calculator (DEMO) v0.9.99.70
sdn@sdn-Virtual-Machine:/$ 

sdn@sdn-Virtual-Machine:/$ vtm -p p
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -p p
apps: Loading settings from "/etc/vtm/settings.xml"...
      Not found
apps: Loading settings from "/home/sdn/.config/vtm/settings.xml"...
      Not found
main: New desktop session for [sdn@sdn-Virtual-Machine]
  os: Process forked

sdn@sdn-Virtual-Machine:/$ vtm -r
  os: Terminal type: xterm-256color
  os: Color mode: xterm truecolor
  os: Mouse mode: VT-style
 vtm: v0.9.99.70
args: vtm -r
apps: Loading settings from "/etc/vtm/settings.xml"...
      Not found
apps: Loading settings from "/home/sdn/.config/vtm/settings.xml"...
      Not found
Teletype Console v0.9.99.70
sdn@sdn-Virtual-Machine:/$ 

o-sdn-o avatar Mar 09 '25 19:03 o-sdn-o

Please reopen (or ping me) this issue if this is not resolved.

o-sdn-o avatar Nov 12 '25 18:11 o-sdn-o