NewEraCracker / LOIC

Deprecated - Low Orbit Ion Cannon - An open source network stress tool, written in C#. Based on Praetox's LOIC project. USE ON YOUR OWN RISK. WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. IF YOU GET V& IT IS YOUR FAULT.
https://github.com/NewEraCracker/LOIC/
Other
2.66k stars 650 forks source link

Running LOIC with mono on macOS #81

Closed The-SamminAter closed 4 years ago

The-SamminAter commented 4 years ago

Mono has been installed with mono's installer package (though the same error occurred when trying to run with mono installed from homebrew), and LOIC has been compiled ./loic.sh install. The error was received when running ./loic.sh run:

grep: /etc/*-release: No such file or directory
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all

=================================================================
    Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x10c84de3b - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_dump_native_crash_info
    0x10c7e6415 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_handle_native_crash
    0x10c847f6e - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : altstack_handle_and_restore
    0x7fffba1a37a1 - /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight : SLDisplayBounds
    0x11301078d - Unknown
    0x10ccdea26 - Unknown
    0x10c7432eb - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_jit_runtime_invoke
    0x10c952522 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_runtime_try_invoke
    0x10c951148 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_runtime_class_init_full
    0x10c73ae00 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_jit_compile_method_inner
    0x10c73e7ea - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_jit_compile_method_with_opt
    0x10c7e8ff7 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : common_call_trampoline
    0x10c7e8a30 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_magic_trampoline
    0x10cc23393 - Unknown
    0x112b94b9b - Unknown
    0x112e16a37 - Unknown
    0x112b99c43 - Unknown

=================================================================
    Telemetry Dumper:
=================================================================
Pkilling 0x700007aa0000 from 0x7fffc6d3a3c0
Entering thread summarizer pause from 0x7fffc6d3a3c0
Finished thread summarizer pause from 0x7fffc6d3a3c0.

Waiting for dumping threads to resume

=================================================================
    External Debugger Dump:
=================================================================
(lldb) command source -s 0 '/tmp/mono-gdb-commands.46978'
Executing commands in '/tmp/mono-gdb-commands.46978'.
(lldb) process attach --pid 46978
warning: (x86_64) /Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (x86_64) /Library/Frameworks/Mono.framework/Versions/6.8.0/lib/libglib-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
Process 46978 stopped
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fffbdeeb3ee libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
->  0x7fffbdeeb3ee <+10>: jae    0x7fffbdeeb3f8            ; <+20>
    0x7fffbdeeb3f0 <+12>: movq   %rax, %rdi
    0x7fffbdeeb3f3 <+15>: jmp    0x7fffbdee3cd4            ; cerror
    0x7fffbdeeb3f8 <+20>: retq   
Target 0: (mono) stopped.

Executable module set to "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono".
Architecture set to: x86_64-apple-macosx.
(lldb) thread list
Process 46978 stopped
* thread #1: tid = 0x6faae, 0x00007fffbdeeb3ee libsystem_kernel.dylib`__wait4 + 10, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x6fab3, 0x00007fffbdeeabf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
  thread #3: tid = 0x6fabd, 0x00007fffbdee3386 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
  thread #4: tid = 0x6fabe, 0x00007fffbdeeb44e libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #5: tid = 0x6fabf, 0x00007fffbdeeb44e libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #6: tid = 0x6fac0, 0x00007fffbdeeb44e libsystem_kernel.dylib`__workq_kernreturn + 10
(lldb) thread backtrace all
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fffbdeeb3ee libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x000000010c84e057 mono`mono_dump_native_crash_info at mini-posix.c:1084 [opt]
    frame #2: 0x000000010c84dddc mono`mono_dump_native_crash_info(signal="SIGSEGV", mctx=<unavailable>, info=<unavailable>) at mini-posix.c:1130 [opt]
    frame #3: 0x000000010c7e6415 mono`mono_handle_native_crash(signal="SIGSEGV", mctx=0x00007fff534cd6d0, info=0x0000000000000000) at mini-exceptions.c:3425 [opt]
    frame #4: 0x000000010c847f6e mono`altstack_handle_and_restore(ctx=0x00007fff534cd6d0, obj=0x0000000000000000, flags=0) at exceptions-amd64.c:881 [opt]
    frame #5: 0x00007fffba1a37a1 SkyLight`SLDisplayBounds + 68
    frame #6: 0x000000011301078d
    frame #7: 0x000000010ccdea26
    frame #8: 0x000000010c7432eb mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x0000000000000000, exc=0x0000000113010000, error=<unavailable>) at mini-runtime.c:3190 [opt]
    frame #9: 0x000000010c952522 mono`mono_runtime_try_invoke [inlined] do_runtime_invoke(method=<unavailable>, obj=0x0000000000000000, params=0x0000000000000000, exc=0x00007fff534cddc0, error=0x00007fff534cdff0) at object.c:3044 [opt]
    frame #10: 0x000000010c9524e6 mono`mono_runtime_try_invoke(method=0x00007f978c0f3a28, obj=0x0000000000000000, params=0x0000000000000000, exc=<unavailable>, error=0x00007fff534cdff0) at object.c:3153 [opt]
    frame #11: 0x000000010c951148 mono`mono_runtime_class_init_full(vtable=0x00007f978c14d8d0, error=<unavailable>) at object.c:551 [opt]
    frame #12: 0x000000010c73ae00 mono`mono_jit_compile_method_inner(method=0x00007f978c0d1480, target_domain=0x00007f978b50df40, opt=<unavailable>, error=0x00007fff534cdff0) at mini.c:4169 [opt]
    frame #13: 0x000000010c73e7ea mono`mono_jit_compile_method_with_opt(method=0x00007f978c0d1480, opt=<unavailable>, jit_only=0, error=0x00007fff534cdff0) at mini-runtime.c:2444 [opt]
    frame #14: 0x000000010c7e8ff7 mono`common_call_trampoline(regs=0x00007fff534ce0a8, code="H\x8b?H??\xa8H\x8b??8, m=0x00007f978c0d1480, vt=0x0000000000000000, vtable_slot=<unavailable>, error=0x00007fff534cdff0) at mini-trampolines.c:635 [opt]
    frame #15: 0x000000010c7e8a30 mono`mono_magic_trampoline(regs=0x00007fff534ce0a8, code="H\x8b?H??\xa8H\x8b??8, arg=0x00007f978c0d1480, tramp=<unavailable>) at mini-trampolines.c:773 [opt]
    frame #16: 0x000000010cc23393
    frame #17: 0x0000000112b94b9b
    frame #18: 0x0000000112e16a37
    frame #19: 0x0000000112b99c43
  thread #2, name = 'SGen worker'
    frame #0: 0x00007fffbdeeabf2 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fffbdfd67fa libsystem_pthread.dylib`_pthread_cond_wait + 712
    frame #2: 0x000000010ca228be mono`thread_func [inlined] mono_os_cond_wait(mutex=<unavailable>) at mono-os-mutex.h:177 [opt]
    frame #3: 0x000000010ca228ab mono`thread_func at sgen-thread-pool.c:165 [opt]
    frame #4: 0x000000010ca2289d mono`thread_func(data=0x0000000000000000) at sgen-thread-pool.c:196 [opt]
    frame #5: 0x00007fffbdfd593b libsystem_pthread.dylib`_pthread_body + 180
    frame #6: 0x00007fffbdfd5887 libsystem_pthread.dylib`_pthread_start + 286
    frame #7: 0x00007fffbdfd508d libsystem_pthread.dylib`thread_start + 13
  thread #3, name = 'Finalizer'
    frame #0: 0x00007fffbdee3386 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010c9cf7ca mono`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-os-semaphore.h:84 [opt]
    frame #2: 0x000000010c9cf7bf mono`finalizer_thread at mono-coop-semaphore.h:41 [opt]
    frame #3: 0x000000010c9cf7a5 mono`finalizer_thread(unused=<unavailable>) at gc.c:963 [opt]
    frame #4: 0x000000010c97c4f8 mono`start_wrapper [inlined] start_wrapper_internal at threads.c:1233 [opt]
    frame #5: 0x000000010c97c4a3 mono`start_wrapper(data=0x00007f978b701df0) at threads.c:1306 [opt]
    frame #6: 0x00007fffbdfd593b libsystem_pthread.dylib`_pthread_body + 180
    frame #7: 0x00007fffbdfd5887 libsystem_pthread.dylib`_pthread_start + 286
    frame #8: 0x00007fffbdfd508d libsystem_pthread.dylib`thread_start + 13
  thread #4
    frame #0: 0x00007fffbdeeb44e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fffbdfd5621 libsystem_pthread.dylib`_pthread_wqthread + 1426
    frame #2: 0x00007fffbdfd507d libsystem_pthread.dylib`start_wqthread + 13
  thread #5
    frame #0: 0x00007fffbdfd5070 libsystem_pthread.dylib`start_wqthread
  thread #6
    frame #0: 0x00007fffbdeeb44e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fffbdfd5621 libsystem_pthread.dylib`_pthread_wqthread + 1426
    frame #2: 0x00007fffbdfd507d libsystem_pthread.dylib`start_wqthread + 13
(lldb) detach

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7fffba1a37a1):0x7fffba1a3791  45 d8 89 f7 48 89 c6 e8 1d f4 f8 ff 48 8b 45 f0  E...H.......H.E.
0x7fffba1a37a1  48 89 43 18 48 8b 45 e8 48 89 43 10 48 8b 45 d8  H.C.H.E.H.C.H.E.
0x7fffba1a37b1  48 8b 4d e0 48 89 4b 08 48 89 03 48 89 d8 48 83  H.M.H.K.H..H..H.
0x7fffba1a37c1  c4 28 5b 5d c3 55 48 89 e5 48 83 ec 20 48 8b 05  .([].UH..H.. H..
Process 46978 detached

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at System.Windows.Forms.XplatUICarbon:CGDisplayBounds <0x000bc>
      at System.Windows.Forms.XplatUICarbon:get_WorkingArea <0x00072>
      at System.Windows.Forms.XplatUICarbon:get_VirtualScreen <0x00043>
      at System.Windows.Forms.XplatUI:get_VirtualScreen <0x00048>
      at System.Windows.Forms.Screen:.cctor <0x0017a>
      at System.Object:runtime_invoke_void <0x000a5>
      at <unknown> <0xffffffff>
      at System.Windows.Forms.Form:get_CreateParams <0x0062a>
      at System.Windows.Forms.Control:UpdateBounds <0x00096>
      at System.Windows.Forms.Control:SetBoundsCore <0x002b2>
      at System.Windows.Forms.Form:SetBoundsCore <0x0018a>
      at System.Windows.Forms.Control:SetBounds <0x00187>
      at System.Windows.Forms.Control:ScaleControl <0x000ca>
      at System.Windows.Forms.ScrollableControl:ScaleControl <0x00052>
      at System.Windows.Forms.Form:ScaleControl <0x00052>
      at System.Windows.Forms.Control:Scale <0x0020b>
      at System.Windows.Forms.ContainerControl:PerformAutoScale <0x001ba>
      at System.Windows.Forms.ContainerControl:PerformAutoScale <0x00042>
      at System.Windows.Forms.ContainerControl:PerformDelayedAutoScale <0x0004a>
      at System.Windows.Forms.ContainerControl:PerformDelayedAutoScale <0x000a2>
      at System.Windows.Forms.Control:ResumeLayout <0x001ba>
      at LOIC.frmMain:InitializeComponent <0x0b41a>
      at LOIC.frmMain:.ctor <0x00372>
      at LOIC.frmMain:.ctor <0x000b2>
      at LOIC.Program:Main <0x003ea>
      at <Module>:runtime_invoke_void_object <0x000b0>
(lldb) quit
=================================================================
./loic.sh: line 83: 46978 Abort trap: 6           mono --runtime=v4.0.30319 src/bin/Debug/LOIC.exe
The-SamminAter commented 4 years ago

I am able to run LOIC with Wine (after having installed dotnet20), so it /can/ run on macOS.

NewEraCracker commented 4 years ago

./loic.sh (Dotnet 4.0) and ./loic-net4.5.sh (Dotnet 4.5) are only intended & tested for Linux systems.