FarManager
FarManager copied to clipboard
Crash in NetBox after some inactivity
Far Manager version
3.0.6300.0 x64 (15c0671)
OS version
10.0.17763.2565
Other software
No response
Steps to reproduce
Opent SFTP connection to NetBox, wait for inactivity timeout
Expected behavior
Far doesn't crash
Actual behavior
Far crashed bug_report.txt
Have you tried the latest version? With your "so called" steps to reproduce, I do not have any issues. Maybe you need to share more details.
Looks like a pure Netbox issue to me. Stack with symbols:
001F97A5 NetBox.dll!nbstr_release(CMStringData * pThis), Line 90
00010C90 NetBox.dll!CMSimpleStringT<wchar_t>::~CMSimpleStringT<wchar_t>(void), Line 53
00512D8A NetBox.dll!_CallSettingFrameEncoded(void), Line 183
00508BD7 NetBox.dll!__FrameHandler4::FrameUnwindToState(unsigned __int64 * pRN, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo, int targetState), Line 1150
005039F5 NetBox.dll!__FrameHandler4::FrameUnwindToEmptyState(unsigned __int64 * pRN, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo), Line 234
00507B39 NetBox.dll!__InternalCxxFrameHandler<__FrameHandler4>(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo, int CatchDepth, unsigned __int64 * pMarkerRN, unsigned char recursive), Line 355
00507C71 NetBox.dll!__InternalCxxFrameHandlerWrapper<__FrameHandler4>(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo, int CatchDepth, unsigned __int64 * pMarkerRN, unsigned char recursive), Line 236
00504405 NetBox.dll!__CxxFrameHandler4(EHExceptionRecord * pExcept, unsigned __int64 RN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC), Line 306
000A4AAF ntdll.dll!_chkstk+0x19F
0000610C ntdll.dll!RtlUnwindEx+0x51C
00503FDE NetBox.dll!__FrameHandler4::UnwindNestedFrames(unsigned __int64 * pFrame, EHExceptionRecord * pExcept, _CONTEXT * pContext, unsigned __int64 * pEstablisher, void * Handler, FH4::FuncInfo4 * __formal, int TargetUnwindState, int CatchState, FH4::HandlerType4 * pCatch, _xDISPATCHER_CONTEXT * pDC, unsigned char recursive), Line 688
00506589 NetBox.dll!CatchIt<__FrameHandler4>(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo, FH4::HandlerType4 * pCatch, const _s_CatchableType * pConv, FH4::TryBlockMapEntry4 * pEntry, int CatchDepth, unsigned __int64 * pMarkerRN, unsigned char IsRethrow, unsigned char recursive), Line 1374
00506E01 NetBox.dll!FindHandler<__FrameHandler4>(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo, unsigned char recursive, int CatchDepth, unsigned __int64 * pMarkerRN), Line 629
00507C0C NetBox.dll!__InternalCxxFrameHandler<__FrameHandler4>(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo, int CatchDepth, unsigned __int64 * pMarkerRN, unsigned char recursive), Line 403
00507C71 NetBox.dll!__InternalCxxFrameHandlerWrapper<__FrameHandler4>(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, FH4::FuncInfo4 * pFuncInfo, int CatchDepth, unsigned __int64 * pMarkerRN, unsigned char recursive), Line 236
00504405 NetBox.dll!__CxxFrameHandler4(EHExceptionRecord * pExcept, unsigned __int64 RN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC), Line 306
000A4A2F ntdll.dll!_chkstk+0x11F
00004CEF ntdll.dll!RtlWalkFrameChain+0x14BF
00008AE6 ntdll.dll!RtlRaiseException+0x316
00039319 KERNELBASE.dll!RaiseException+0x69
0050339F NetBox.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo), Line 82
00060BE4 NetBox.dll!TTerminal::FatalError(Exception * E, const UnicodeString & AMsg, const UnicodeString & AHelpKeyword), Line 3067
00086F0C NetBox.dll!TSecureShell::PuttyFatalError(const UnicodeString & AError), Line 1628
00124FAE NetBox.dll!connection_fatal(Seat * seat, const char * message), Line 270
00242768 NetBox.dll!seat_connection_fatal(Seat * seat, const char * fmt, ...), Line 18
00216135 NetBox.dll!ssh_remote_error(Ssh * ssh, const char * fmt, ...), Line 483
0020FBAB NetBox.dll!select_result(unsigned __int64 wParam, __int64 lParam), Line 1715
00084D06 NetBox.dll!TSecureShell::HandleNetworkEvents(unsigned __int64 Socket, _WSANETWORKEVENTS & Events), Line 2086
00085D09 NetBox.dll!TSecureShell::ProcessNetworkEvents(unsigned __int64 Socket), Line 2098
00082794 NetBox.dll!TSecureShell::EventSelectLoop::__l8::<lambda>(void), Line 2177
00081581 NetBox.dll!Sysutils::detail::scope_guard<void <lambda>(void),void <lambda>(void)>::scope_guard<void <lambda>(void),void <lambda>(void)>(TSecureShell::EventSelectLoop::__l8::void <lambda>(void) && f, TSecureShell::EventSelectLoop::__l8::void <lambda>(void) && f2), Line 479
0008104E NetBox.dll!Sysutils::detail::make_try_finally<void <lambda>(void),void <lambda>(void)>(TSecureShell::EventSelectLoop::__l8::void <lambda>(void) && f, TSecureShell::EventSelectLoop::__l8::void <lambda>(void) && f2), Line 496
000841DE NetBox.dll!TSecureShell::EventSelectLoop(unsigned int MSec, bool ReadEventRequired, _WSANETWORKEVENTS * Events), Line 2222
0008538E NetBox.dll!TSecureShell::Idle(unsigned int MSec), Line 2272
00064501 NetBox.dll!TTerminal::Idle(void), Line 1368
001BF52D NetBox.dll!TWinSCPFileSystem::ProcessPanelEventEx(__int64 Event, void * Param), Line 759
001AB71F NetBox.dll!TCustomFarPlugin::ProcessSynchroEvent(const ProcessSynchroEventInfo * Info), Line 294
001970D6 NetBox.dll!ProcessSynchroEventW(const ProcessSynchroEventInfo * Info), Line 107
Apparently TTerminal::FatalError threw an exception and something else up the stack didn't manage to recover from it.
@michaellukashov @ssvine FYI (also please consider including a map file, users not always have PDBs)
Have you tried the latest version? With your "so called" steps to reproduce, I do not have any issues. Maybe you need to share more details.
I believe the issue is environment-specific. I would be happy to provide more details if you could guide me on how to collect them.
Can you download the latest Far build (it has the most recent NetBox) and try to reproduce the bug again?
I cannot reproduce the bug, so this information may help me:
- Have you changed any default parameters of the session (and the plugin itself)? Can you confirm that you are using SFTP protocol (not SCP)?
- What exactly did you do after the session was opened? You mentioned inactivity timeout, how long does it last?
- What kind of SSH server do you use? Maybe you know what non-default configuration parameters are used by the SSH server? In particular, if you use OpenSSH, I'm interested in the result of the following command
sshd -T | grep -i alive
. - Does the bug occur constantly or occasionally?
- Do you use any proxy?
- You use quite old Windows version, do you have the opportunity to reproduce the bug on another machine?
Can you download the latest Far build (it has the most recent NetBox) and try to reproduce the bug again?
Downloaded Nightly Build x64 archive from https://www.farmanager.com/download.php?l=en Is it latest?
- Have you changed any default parameters of the session (and the plugin itself)? Can you confirm that you are using SFTP protocol (not SCP)?
Nothing changed in default settings. I've added new SFTP session in NetBox of newly downloaded Far keeping "allow SCP fallback" checked by default
- What exactly did you do after the session was opened? You mentioned inactivity timeout, how long does it last?
After opening session I did a command "cd /opt", then switched to my other apps so that Far window stays in background. Waited for ~ 40 minutes and got the crash. VPN to the SSH server was disconnected and reconnected during this period. I've checked VPN reconnection without waiting - NetBox managed to recover connection with no crash.
- What kind of SSH server do you use? Maybe you know what non-default configuration parameters are used by the SSH server? In particular, if you use OpenSSH, I'm interested in the result of the following command
sshd -T | grep -i alive
.
Version: OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021
sshd -T | grep -I alive clientaliveinterval 300 clientalivecountmax 3 tcpkeepalive no
- Does the bug occur constantly or occasionally?
By now I've observed this on two different environments, different clients, different servers, different network arrangements. I can't say that it occurs every time I don't touch Far for some period, but still it crashed quite often.
- Do you use any proxy?
No SSH proxy, direct connection within same LAN for the initial bug report, connection over VPN this time
- You use quite old Windows version, do you have the opportunity to reproduce the bug on another machine?
Reproduced on newer Windows VM OS: Windows NT Workstation 10.0.22000, 0x300/0x65 (Windows 10 Home, version 21H2, OS build 22000.2538) @ssvine please check the new bug report bug_report 2.txt
Downloaded Nightly Build x64 archive from https://www.farmanager.com/download.php?l=en Is it latest?
It is latest, but for debug purposes it is better to take files from https://github.com/FarGroup/FarManager/releases, downloading both .7z (or .msi) file for Far itself, and .pdb.7z file for debug symbols, as now your report have
001F99C5 NetBox.dll!SetStartupInfoW+0x62795
00010C90 NetBox.dll!<unknown> (get the pdb)
0051305A NetBox.dll!SetStartupInfoW+0x37BE2A
00508EA7 NetBox.dll!SetStartupInfoW+0x371C77
00503CC5 NetBox.dll!SetStartupInfoW+0x36CA95
00507E09 NetBox.dll!SetStartupInfoW+0x370BD9
00507F41 NetBox.dll!SetStartupInfoW+0x370D11
005046D5 NetBox.dll!SetStartupInfoW+0x36D4A5
Which is not useful without .pdb on your side or .dmp file from crash
bug_report 3.txt Reproduced with PDBs @Px-x64 @ssvine have a look
@exkrexpexfex, @Px-x64 thanks. I'll check soon.
@exkrexpexfex, @Px-x64: NetBox 24.5.0.602 is ready, now you can test the fix.
Looks good now. I didn't manage to reproduce the crash with the new NetBox version. @ssvine great work! Thank you