microsoft / vs-pty.net

Fork pseudoterminals in C#
MIT License
46 stars 18 forks source link

Segmentation fault (core dumped) on NET8@Ubuntu24.04 when call PtyProvider.SpawnAsync #37

Open bnuzhouwei opened 1 month ago

bnuzhouwei commented 1 month ago

Everything is ok on net6, but on net8 got

info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://0.0.0.0:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /root/dd8
Waiting on 10681
Segmentation fault (core dumped)
fartwhif commented 6 days ago

also getting segfault upon app launch, using net8.0, it works OK on windows using WinPty, but not linux

CancellationTokenSource cts = new CancellationTokenSource();

PtyOptions po = new PtyOptions()
{
App = "mpg123",
Cwd = "/usr/bin",
ForceWinPty = Environment.OSVersion.Platform == PlatformID.Win32NT,
Cols = 80,
Rows = 100,
};

var x = PtyProvider.SpawnAsync(po, cts.Token);
Sep 14 20:14:51 raspberry kernel: [28342.570113] test2[28594]: segfault at 55d3c843c470 ip 00007f824fcf1d10 sp 00007ffd3c2df310 error 4 in libcoreclr.so[7f824fc7a000+4b8000]
Sep 14 20:14:51 raspberry kernel: [28342.570118] Code: 00 48 83 c6 40 ff c2 49 89 de 49 c1 ee 02 48 89 75 a0 89 55 ac 0f 1f 44 00 00 44 89 f0 31 d2 f7 75 98 48 c1 e2 06 4c 8d 2c 16 <48> 39 1c 16 75 3a 0f ae f0 4d 8b 65 20 48 b8 ff ff ff ff ff ff ff