How to get filename and line number in crash backtrace from my DKMS module? - crash-dumps

I'm building a Linux module, on a Debian distribution, using DKMS, and I have a kernel freeze that I need to debug.
I've installed the crash command line tool, with the kernel debug symbols.
When a freeze happens, I have a crash file which I load with the crash command, and I can see the filenames and line numbers for each of the lines from the kernel trace, but when it is about my module, I don't have any filename, nor line number.
Here is an example:
WARNING: active task ffff98d215239e80 on cpu 1 not found in PID hash
KERNEL: /usr/lib/debug/boot/vmlinux-4.19.0-8-amd64
DUMPFILE: /var/crash/202004292108/dump.202004292108 [PARTIAL DUMP]
CPUS: 12
DATE: Wed Apr 29 21:07:00 2020
UPTIME: 00:13:32
LOAD AVERAGE: 0.62, 0.57, 0.37
TASKS: 886
NODENAME: debian
RELEASE: 4.19.0-8-amd64
VERSION: #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27)
MACHINE: x86_64 (3700 Mhz)
MEMORY: 16 GB
PANIC: "BUG: unable to handle kernel NULL pointer dereference at 0000000000000018"
PID: 15775
COMMAND: "douaned"
TASK: ffff98d215239e80 [THREAD_INFO: ffff98d215239e80]
CPU: 1
STATE: EXIT_DEAD (PANIC)
crash> bt -l
PID: 15775 TASK: ffff98d215239e80 CPU: 1 COMMAND: "douaned"
#0 [ffff98d36e843870] machine_kexec at ffffffff87656967
./debian/build/build_amd64_none_amd64/./arch/x86/include/asm/mem_encrypt.h: 75
#1 [ffff98d36e8438c8] __crash_kexec at ffffffff877213ad
./debian/build/build_amd64_none_amd64/./kernel/kexec_core.c: 958
#2 [ffff98d36e843990] crash_kexec at ffffffff877221fd
./debian/build/build_amd64_none_amd64/./include/linux/compiler.h: 219
#3 [ffff98d36e8439a8] oops_end at ffffffff8762a0ad
./debian/build/build_amd64_none_amd64/./arch/x86/kernel/dumpstack.c: 334
#4 [ffff98d36e8439c8] no_context at ffffffff876653ee
./debian/build/build_amd64_none_amd64/./arch/x86/mm/fault.c: 808
#5 [ffff98d36e843a20] __do_page_fault at ffffffff87665ab2
./debian/build/build_amd64_none_amd64/./arch/x86/mm/fault.c: 1323
#6 [ffff98d36e843a90] page_fault at ffffffff87e0114e
/build/linux-AqT5hv/linux-4.19.98/arch/x86/entry/entry_64.S: 1204
[exception RIP: idr_find]
RIP: ffffffff87d0b860 RSP: ffff98d36e843b40 RFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff98d20e848000 RCX: 0000000000000000
RDX: 000000009456dad9 RSI: 0000000000005807 RDI: 0000000000000008
RBP: ffff98d363bc3ae8 R8: 000000000001421d R9: 00000000917bc5e0
R10: ffff98d36e843bae R11: 0000000000000049 R12: 0000000000000004
R13: ffff98d226491480 R14: ffff98d206f28cfc R15: ffff98d206f28d10
ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
./debian/build/build_amd64_none_amd64/./lib/idr.c: 177
#7 [ffff98d36e843b40] find_get_pid at ffffffff8769e846
./debian/build/build_amd64_none_amd64/./include/linux/pid.h: 71
#8 [ffff98d36e843b48] netfiler_packet_hook at ffffffffc1962eda [douane]
#9 [ffff98d36e843ce8] nf_hook_slow at ffffffff87c2eea4
./debian/build/build_amd64_none_amd64/./net/netfilter/core.c: 512
#10 [ffff98d36e843d18] __ip_local_out at ffffffff87c3c8a7
./debian/build/build_amd64_none_amd64/./include/linux/netfilter.h: 248
#11 [ffff98d36e843d70] ip_local_out at ffffffff87c3c927
./debian/build/build_amd64_none_amd64/./net/ipv4/ip_output.c: 123
...
Have a look at the line #8.
From the DKMS documentation, I found the STRIPE=[#] config to which I passed no in order to not remove the debug symbols (as the documentation says), but I still don't have any filenames nor line numbers.
Can anyone tell how can I have them showing please?

I finally figured it out !
You first need to know where is installed your kernel module file (douane.ko in my case, which is installed in /lib/modules/$(uname -r)/updates/dkms/), then after having loaded the crash file, like it is shown in the question, you then need to load the module's debug symbols using the mod command:
crash> mod -s douane /lib/modules/4.19.0-8-amd64/updates/dkms/douane.ko
MODULE NAME SIZE OBJECT FILE
ffffffffc17f8040 douane 28672 /lib/modules/4.19.0-8-amd64/updates/dkms/douane.ko
From now on, using bt -l will show you also the line number from your kernel module source code too.

Related

React native app crash on ios when running release or debug

Here is the crash report:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD 1 Library missing
Library not loaded: #rpath/double-conversion.framework/double-conversion
Referenced from: <FC807FC8-F29C-3926-8FD2-B52AB0C43805> /Users/USER/Library/Developer/CoreSimulator/Devices/9DC328E5-38CB-4BAE-AA0F-E2976C0765E4/data/Containers/Bundle/Application/EFC99D36-68DA-47EB-A147-602CC1AE1B59/tekvetek_RN.app/tekvetek_RN
Reason: tried: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2), '/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2, no dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2), '/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2, no dyld cache), '/Users/omerkocer/Libra
(terminated at launch; ignore backtrace)
Triggered by Thread: 0
Thread 0 Crashed:
0 ??? 0x1062d6940 ???
1 <translation info unavailable> 0x1063636fc ???
2 dyld 0x206696a72 abort_with_payload_wrapper_internal + 80
3 dyld 0x206696aa4 abort_with_payload + 9
4 dyld_sim 0x10ea79593 abort_with_payload + 26
5 dyld_sim 0x10ea26f1e dyld4::halt(char const*) + 375
6 dyld_sim 0x10ea24f75 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3928
7 dyld_sim 0x10ea251a0 _dyld_sim_prepare + 442
8 dyld 0x206640b78 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 1265
9 dyld 0x20663f70e dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 244
10 dyld 0x20663f4e4 start + 388
Thread 1:: com.apple.rosetta.exceptionserver
0 ??? 0x7ff7ffeed944 ???
1 ??? 0x7ff7fff061f0 ???
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000006 rbx: 0x000000000000010b rcx: 0x0000000000000001 rdx: 0x000000030efbe6c0
rdi: 0x000000200ea28d03 rsi: 0x000000030efbe390 rbp: 0x0000000000000000 rsp: 0x000000030efbe2c0
r8: 0x000000030efbe2c0 r9: 0x0000000000000000 r10: 0x000000000000010b r11: 0xfefefefefefefeff
r12: 0x000000000000010b r13: 0x000000030efbe6c0 r14: 0x0000000000000001 r15: 0x0000000000000006
rip: <unavailable> rfl: 0x0000000000000283
tmp0: 0xffffffffffffffff tmp1: 0x00000001062d6914 tmp2: 0x0000000206696a72
Binary Images:
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x20663a000 - 0x2066a5fff dyld (*) <71febccd-d9dc-3599-9971-2b3407c588a8> /usr/lib/dyld
0x10ea23000 - 0x10ea82fff dyld_sim (*) <db2ea9eb-03d5-3b81-a6ce-26ec4dd81b07> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed
EOF
As I understand it crashes because it can't find the #rpath/double-conversion.framework/double-conversion library.
I tried to linked binary with libraries:
libDoubleConversion.a
double-conversion.xcframework
But still same.
P.S.
The app is running without crashes with npx react-native run-ios or in xcode after build. However npx react-native run-ios --configuration=debug or --configuration=release is crashing the app on launch with EXC_CRASH (SIGABRT).
PROJECT > TARGET > BUILD PHASES > Link Binary With Libraries
I changed this libraries status
libDoubleConversion.a
double-conversion.xcframework
required from optional.
This worked for me.

Could not run XCode 9.1 on MacOS 12

I am trying to migrate my Swift 3 code to Swift 4 to meet the requirement of Apple. I downloaded Xcode 9.1, renamed it to Xcode9.1.app, and moved it to the Applications.
I tried to open it as explained in the following link: How can I run Xcode 12.5.1 on Monterey?. But it quits.
The quitting message is:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Xcode [14762]
Path: /Applications/Xcode9.0.1.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0.1 (13249)
Build Info: IDEFrameworks-13249000000000000~2 (9A1004)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2022-01-10 11:36:20.3726 -0600
OS Version: macOS 12.0.1 (21A559)
Report Version: 12
Bridge OS Version: 6.0 (19P549)
Anonymous UUID: A485806D-0882-7796-CC9C-BB31F6F3E237
Sleep/Wake UUID: 22979CA9-B8DA-4613-99F5-34DE333FABB8
Time Awake Since Boot: 570000 seconds
Time Since Wake: 7415 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace DYLD, Code 1 Library missing
Library not loaded: #rpath/XCTest.framework/Versions/A/XCTest
Referenced from: /Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
Reason: tried: '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Applications/Instruments.app/Contents/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/MacOS/../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applicat
(terminated at launch; ignore backtrace)
Application Specific Information:
Library not loaded: #rpath/XCTest.framework/Versions/A/XCTest
Referenced from: /Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
Reason: tried: '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Applications/Instruments.app/Contents/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/MacOS/../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applicat
Thread 0 Crashed:
0 dyld 0x10c9c60ce __abort_with_payload + 10
1 dyld 0x10c9dc1cf abort_with_payload_wrapper_internal + 80
2 dyld 0x10c9dc201 abort_with_payload + 9
3 dyld 0x10c98a613 dyld4::halt(char const*) + 375
4 dyld 0x10c98655d dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3955
5 dyld 0x10c9854b4 start + 388
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000002000209 rbx: 0x0000000000000000 rcx: 0x00007ff7baf28a28 rdx: 0x00007ff7baf28e90
rdi: 0x0000000000000006 rsi: 0x0000000000000001 rbp: 0x00007ff7baf28a70 rsp: 0x00007ff7baf28a28
r8: 0x00007ff7baf28a90 r9: 0x0000000000000000 r10: 0x0000000000000096 r11: 0x0000000000000246
r12: 0x0000000000000096 r13: 0x00007ff7baf28e90 r14: 0x0000000000000001 r15: 0x0000000000000006
rip: 0x000000010c9c60ce rfl: 0x0000000000000246 cr2: 0x0000000104fe7000
Logical CPU: 0
Error Code: 0x02000209
Trap Number: 133
Binary Images:
0x10c980000 - 0x10c9ebfff dyld (*) <1a6ae033-9438-33c0-8077-988fd885250a> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 41
thread_create: 0
thread_set_state: 935
VM Region Summary:
ReadOnly portion of Libraries: Total=991.7M resident=0K(0%) swapped_out_or_unallocated=991.7M(100%)
Writable regions: Total=9636K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=9636K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
STACK GUARD 56.0M 1
Stack 8192K 1
VM_ALLOCATE 16K 3
__CTF 759 1
__DATA 31.2M 376
__DATA_CONST 12.0M 180
__DATA_DIRTY 534K 106
__FONT_DATA 4K 1
__LINKEDIT 661.8M 47
__OBJC_RO 81.5M 1
__OBJC_RW 3120K 1
__TEXT 329.9M 386
__UNICODE 588K 1
dyld private memory 1024K 1
=========== ======= =======
TOTAL 1.2G 1106
Problem
According to apple, macOS 12 requires you to use Xcode 13.
https://developer.apple.com/news/?id=ufox?.ci5
Solution
There is a way to install only the tool chain for Xcode 9, but not the
app itself. I'm not sure if Migration is possible through the command
line but it seems like the best solution.
https://github.com/mrpippy/XcodeNueve

Xcode Instruments's "Time Profiler" crashes instantly

Why does Instrument's "Time Profiler" crash?
(while "Allocations" works just fine)
What I tried:
Running just for Instrument purpose.
Attaching to an already launched App later (instead of running).
Launch "Allocations" first, then in "Instruments", clicking the "+" button causes same issue (when selecting "Time Profiler").
Retry with both Build-Configurations (Debug and Release).
Clearing build directory, then retrying all of above.
Crash report:
Crashed Thread: 3 Dispatch queue: com.apple.dt.frame.activity
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [13064]
// ...
Thread 3 Crashed:: Dispatch queue: com.apple.dt.frame.activity
0 com.apple.dt.InstrumentsAnalysisCore 0x00000001082497f3 std::__1::__hash_iterator<std::__1::__hash_node<void*, void*>*> std::__1::__hash_table<void*, std::__1::hash<void*>, std::__1::equal_to<void*>, std::__1::allocator<void*> >::find<void*>(void* const&) + 83
1 com.apple.dt.InstrumentsAnalysisCore 0x0000000108249044 XRCLIPS::_delegateCallbackRouter(environmentData*, udfContext*, udfValue*) + 628
2 com.apple.dt.InstrumentsAnalysisCore 0x00000001083018a0 EvaluateExpression + 464
3 com.apple.dt.InstrumentsAnalysisCore 0x00000001083069a8 PutProcBind + 216
4 com.apple.dt.InstrumentsAnalysisCore 0x0000000108301a89 EvaluateExpression + 953
5 com.apple.dt.InstrumentsAnalysisCore 0x00000001081e61ab PrognFunction + 75
6 com.apple.dt.InstrumentsAnalysisCore 0x00000001083018a0 EvaluateExpression + 464
7 com.apple.dt.InstrumentsAnalysisCore 0x000000010830887c EvaluateProcActions + 604
8 com.apple.dt.InstrumentsAnalysisCore 0x000000010832b357 Run + 2327
9 com.apple.dt.InstrumentsAnalysisCore 0x000000010832c312 RunCommand + 130
10 com.apple.dt.InstrumentsAnalysisCore 0x00000001083018a0 EvaluateExpression + 464
11 com.apple.dt.InstrumentsAnalysisCore 0x00000001081e61ab PrognFunction + 75
12 com.apple.dt.InstrumentsAnalysisCore 0x00000001083018a0 EvaluateExpression + 464
13 com.apple.dt.InstrumentsAnalysisCore 0x000000010830887c EvaluateProcActions + 604
14 com.apple.dt.InstrumentsAnalysisCore 0x00000001081f4cc7 CallDeffunction + 391
15 com.apple.dt.InstrumentsAnalysisCore 0x000000010831df17 EvaluateDeffunctionCall + 39
16 com.apple.dt.InstrumentsAnalysisCore 0x0000000108301a89 EvaluateExpression + 953
17 com.apple.dt.InstrumentsAnalysisCore 0x00000001082b0478 RouteCommand + 1128
18 com.apple.dt.InstrumentsAnalysisCore 0x000000010824acdc invocation function for block in XRCLIPS::executeCommand(NSString*, NSString*) + 684
19 com.apple.dt.InstrumentsAnalysisCore 0x000000010824a7c3 _runInCLocale(void () block_pointer) + 51
20 com.apple.dt.InstrumentsAnalysisCore 0x000000010824a9dc XRCLIPS::executeCommand(NSString*, NSString*) + 124
21 com.apple.dt.InstrumentsAnalysisCore 0x00000001082c369d -[XRAnalysisCoreBindingHemisphere solveBindingProblem] + 109
22 com.apple.dt.instruments.InstrumentsPlugIn 0x00000001087c6835 -[XRAnalysisCoreSetupAgent _solveBindingProblem:] + 130
23 com.apple.dt.instruments.InstrumentsPlugIn 0x00000001087c5b8c -[XRAnalysisCoreSetupAgent executeStopOnItinerary:] + 695
24 com.apple.dt.instruments.DVTInstrumentsUtilities 0x0000000107fa40e4 -[XRMobileAgent(XRMobileAgentStop) hello] + 272
25 com.apple.dt.instruments.DVTInstrumentsUtilities 0x0000000107fa041d __51-[XRFrameActivityManager _reevaluateArrivingAgent:]_block_invoke + 112
26 com.apple.dt.instruments.DVTInstrumentsUtilities 0x0000000107fa7fc3 xray::scheduler::ActivityManager::_processActivity(void*) + 115
27 libdispatch.dylib 0x00007fff67acf658 _dispatch_client_callout + 8
28 libdispatch.dylib 0x00007fff67ad4c44 _dispatch_lane_serial_drain + 597
29 libdispatch.dylib 0x00007fff67ad55d6 _dispatch_lane_invoke + 363
30 libdispatch.dylib 0x00007fff67adec09 _dispatch_workloop_worker_thread + 596
31 libsystem_pthread.dylib 0x00007fff67d2da3d _pthread_wqthread + 290
32 libsystem_pthread.dylib 0x00007fff67d2cb77 start_wqthread + 15
// ...
Thread 3 crashed with X86 Thread State (64-bit):
rax: 0x0000000000007fb2 rbx: 0x0000000000000004 rcx: 0x8ddf04fbc068655b rdx: 0x1124171e0a32926b
rdi: 0x00007fb2984d6258 rsi: 0x00007fb29ca7f7a0 rbp: 0x00007000011afe70 rsp: 0x00007000011afe70
r8: 0x9ddfea08eb382d69 r9: 0x0000000000000002 r10: 0x00007fff85335500 r11: 0x00007fff2d9e6128
r12: 0x00007fb299af8460 r13: 0x00007000011aff30 r14: 0x0000000000000004 r15: 0x00007fff6697dca0
rip: 0x00000001082497f3 rfl: 0x0000000000010a03 cr2: 0x00000001081f1a10
Logical CPU: 1
Error Code: 0x00000000
Trap Number: 6
// ...
VM Region Summary:
ReadOnly portion of Libraries: Total=828.9M resident=0K(0%) swapped_out_or_unallocated=828.9M(100%)
Writable regions: Total=100.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=100.2M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 384K 3
Activity Tracing 256K 1
CG backing stores 224K 2
CG image 116K 18
CG raster data 216K 11
CoreAnimation 7068K 56
CoreGraphics 8K 1
CoreImage 20K 5
CoreUI image data 1296K 18
Dispatch continuations 4096K 1
Foundation 4K 1
IOKit 7940K 1
Kernel Alloc Once 8K 1
MALLOC 70.3M 113
MALLOC guard page 32K 8
OpenGL GLSL 256K 3
STACK GUARD 56.1M 14
Stack 14.6M 14
VM_ALLOCATE 368K 21
VM_ALLOCATE (reserved) 2048K 2 reserved VM address space (unallocated)
__DATA 77.0M 576
__DATA_CONST 1957K 73
__FONT_DATA 4K 1
__GLSLBUILTINS 5176K 1
__LINKEDIT 409.5M 118
__OBJC_RO 32.3M 1
__OBJC_RW 1908K 2
__TEXT 419.8M 548
__UNICODE 564K 1
mapped file 132.1M 42
shared memory 632K 14
=========== ======= =======
TOTAL 1.2G 1671
TOTAL, minus reserved VM space 1.2G 1671
More info:
Process: Instruments [13064]
Path: /Applications/Xcode_12.4.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
Identifier: com.apple.dt.Instruments
Instruments Version: 12.4 (64543.2)
Build Info: Instruments-64543002000000000~11 (12D4e)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Instruments [13064]
User ID: 502
Date/Time: 2021-10-03 16:02:23.335 +0430
OS Version: Mac OS X 10.15.7 (19H2)
Report Version: 12
Anonymous UUID: 3AB66FC9-BBB6-ACB0-2877-9239C69E7BC1
Sleep/Wake UUID: D2B09D01-75C0-4596-810A-69604C2B70E3
Time Awake Since Boot: 19000 seconds
Time Since Wake: 19000 seconds
System Integrity Protection: disabled
// ...
Model: MacBookPro7,1, BootROM 68.0.0.0.0, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.62f7
Graphics: kHW_NVidiaGeForce320MItem, NVIDIA GeForce 320M, 256 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80AD, 0x484D54313235533654465238432D47372020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80AD, 0x484D54313235533654465238432D47372020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.102.31)
Bluetooth: Version 7.0.6f7, 3 services, 25 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Network Service: iPhone, Ethernet, en3
Serial ATA Device: TOSHIBA MK2555GSXF, 250.06 GB
Serial ATA Device: MATSHITADVD-R UJ-898
USB Device: USB Bus
USB Device: USB Bus
USB Device: BRCM2046 Hub
USB Device: Bluetooth USB Host Controller
USB Device: IR Receiver
USB Device: Apple Internal Keyboard / Trackpad
USB Device: USB 2.0 Bus
USB Device: Built-in iSight
USB Device: SAMSUNG_Android
USB Device: USB 2.0 Bus
USB Device: iPhone
USB Device: Internal Memory Card Reader
Thunderbolt Bus:
After trying the comment's suggestions (which did not fix issue), like:
Empty the whole “derived data” folder and reboot the Mac.
Uninstall Xcode and reinstall it.
Ensure the desired Xcode version is selected (found in “Xcode” » “Preferences” » “Locations”)
I noticed that "Time Profiler" of Xcode 12.4 is not compatible with macOS Catalina (version 10.15.7).
So, the solution seems to be; never use latest Xcode with older macOS, it's simply not backward compatible, well it is backward compatible, but not fully (in some cases, like my question).
Note that this Q/A is about iOS, and Xcode 12.4 has not even SDK for running on macOS 10.15.x.

Wicked PDF silently fails on OS X

With the same code and gem versions, it works just fine in Ubuntu (14.04, 64bit). Currently I am using:
wkhtmltopdf-binary gem v0.9.9.1
wicked_pdf gem v0.10.2
Rails 4.1.1
Ruby 2.1.3
OS X 10.10, 64-bit
When I tried to generate PDF from Rails, i get the error message: wkhtmltopdf_darwin_386 quit unexpectedly. Here's the full error message:
Process: wkhtmltopdf_darwin_386 [1208]
Path: /Users/USER/*/wkhtmltopdf_darwin_386
Identifier: wkhtmltopdf_darwin_386
Version: ???
Code Type: X86 (Native)
Parent Process: ruby [1207]
Responsible: Terminal [560]
User ID: 502
Date/Time: 2014-11-18 13:57:49.082 +0700
OS Version: Mac OS X 10.10 (14A389)
Report Version: 11
Anonymous UUID: FE32CAE5-D54C-30C5-5D5E-6B3F12C58027
Sleep/Wake UUID: 83991D0B-AAA7-4EE0-8FF7-5034B78B788F
Time Awake Since Boot: 8000 seconds
Time Since Wake: 1100 seconds
Crashed Thread: Unknown
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000001
Backtrace not available
Unknown thread crashed with X86 Thread State (32-bit):
eax: 0x015382c8 ebx: 0x00d8c971 ecx: 0x00000001 edx: 0x00000000
edi: 0x00000000 esi: 0x015382b4 ebp: 0xbfff6428 esp: 0xbfff6040
ss: 0x00000023 efl: 0x00010246 eip: 0x00d8e3c2 cs: 0x0000001b
ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f
cr2: 0x00000001
Logical CPU: 3
Error Code: 0x00000004
Trap Number: 14
Binary images description not available
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 1
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 3109
thread_create: 0
thread_set_state: 0
The reason why I said silently in the title, is because when I inspected the server log it's running just fine. Here's an excerpt:
"***************\"/Users/david/.rbenv/versions/2.1.3/bin/wkhtmltopdf\" -q --footer-html \"file:////var/folders/4w/fybp8mln1pn91cqrxq6z2kcc0000gp/T/wicked_footer_pdf20141118-1102-1uce4hg.html\" --margin-bottom 13 \"file:////var/folders/4w/fybp8mln1pn91cqrxq6z2kcc0000gp/T/wicked_pdf20141118-1102-1jrv3s8.html\" \"/var/folders/4w/fybp8mln1pn91cqrxq6z2kcc0000gp/T/wicked_pdf_generated_file20141118-1102-qu51nc.pdf\" ***************"
Rendered text template (1.1ms)
Sent data test.pdf (8.4ms)
Completed 200 OK in 6516ms (Views: 7.5ms | ActiveRecord: 6.8ms)
Running which wkhtmltopdf gives me /Users/david/.rbenv/shims/wkhtmltopdf.. When I ran tested wkhtmltopdf separately (as in wkhtmltopdf test1.html test1.pdf) it runs perfectly.
Is it possible that wkhtmltopdf_darwin_386 doesn't work well in 64-bit based architecture? (Even though my Ubuntu is also 64-bit based.)
Any help is appreciated.
Have you done this? :
create/edit file:
config/initializers/wicked_pdf.rb
If your wkhtmltopdf executable is not on your webserver's path, you can configure it in an initializer:
WickedPdf.config = {
:exe_path => '/Users/USER/*/wkhtmltopdf_darwin_386'
}
soure

vim caught deadly signal SEGV

While using vim with pathogen and rails.vim it sometimes crashes vim. This is my console log file for the crash. How can I prevent this from happening?
Process: vim [16620]
Path: /usr/bin/vim
Identifier: vim
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: zsh [961]
Date/Time: 2011-08-31 08:20:25.727 +0800
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff832af5d6 __kill + 10
1 vim 0x0000000100118943 0x100000000 + 1149251
2 libSystem.B.dylib 0x00007fff832c166a _sigtramp + 26
3 vim 0x00000001000249a2 0x100000000 + 149922
4 vim 0x00000001000249ef 0x100000000 + 149999
5 vim 0x00000001000249ef 0x100000000 + 149999
6 vim 0x0000000100024a1c 0x100000000 + 150044
7 vim 0x00000001000249ef 0x100000000 + 149999
8 vim 0x000000010002554c 0x100000000 + 152908
9 vim 0x0000000100118b75 0x100000000 + 1149813
10 vim 0x000000010010c138 0x100000000 + 1098040
11 vim 0x0000000100069900 0x100000000 + 432384
12 vim 0x000000010006cf45 0x100000000 + 446277
13 vim 0x000000010006d1a3 0x100000000 + 446883
14 vim 0x000000010006d5d6 0x100000000 + 447958
15 vim 0x00000001000a475c 0x100000000 + 673628
16 vim 0x0000000100075bb8 0x100000000 + 482232
17 vim 0x0000000100077e22 0x100000000 + 491042
18 vim 0x0000000100000978 0x100000000 + 2424
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000002 rcx: 0x00000001001cdbc8 rdx: 0x0000000000000000
rdi: 0x00000000000040ec rsi: 0x000000000000000b rbp: 0x00000001001cdbe0 rsp: 0x00000001001cdbc8
r8: 0x0000000000000000 r9: 0x00007fff7073fbc0 r10: 0x00007fff832b1552 r11: 0x0000000000000206
r12: 0x0000000000000029 r13: 0x000000000000007c r14: 0x000000000000007c r15: 0x0000000000000044
rip: 0x00007fff832af5d6 rfl: 0x0000000000000206 cr2: 0x0000000101185000
Binary Images:
0x100000000 - 0x100155fef +vim ??? (???) <F8247F1F-4D43-963A-D218-3D0E8ECFF899> /usr/bin/vim
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) <B536F2F1-9DF1-3B6C-1C2C-9075EA219A06> /usr/lib/dyld
0x7fff83260000 - 0x7fff83421fff libSystem.B.dylib 125.2.10 (compatibility 1.0.0) <9BAEB2F2-B485-6349-E1AB-637FE12EE770> /usr/lib/libSystem.B.dylib
0x7fff85845000 - 0x7fff85849ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff85dcb000 - 0x7fff85e0afef libncurses.5.4.dylib 5.4.0 (compatibility 5.4.0) <E1F34D53-3D62-78C0-CAD8-8AD22C110A9E> /usr/lib/libncurses.5.4.dylib
0x7fff87ca5000 - 0x7fff87d9dff7 libiconv.2.dylib 7.0.0 (compatibility 7.0.0) <E0683DF0-8180-58A2-BA49-511111D4F36E> /usr/lib/libiconv.2.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <9BAEB2F2-B485-6349-E1AB-637FE12EE770> /usr/lib/libSystem.B.dylib
Ask brew to compile macvim with debugging flag set, then run it under a debugger so that when it crashes you can ask the debugger to print the stack trace so that you can see which source code line is trying to access deallocated memory area which causes the SIGSEGV exception.
If you managed to get it that far then see if you can fix the error and submit a patch to the vim-dev list and feel good about it for a week :) good luck!
Vim sometime will crash. If your ruby code are not well format.
process(:hello => 'world', :foo => 'bar')
You should not write as:
process(:hello => 'world',
:foo => 'bar')
In my case vim stopped working after mavericks installation. I tracked it down to an issue with rvm, which was also on my system. 'vim -u NONE' ran fine. There were many suggestions about recompiling command-T, a vim plugin, but doing so didn't fix the problem for me. I ended using 'rvm implode' to remove rvm altogether. Then 'brew uninstall vim && brew install vim'. This fixed vim, and also fixed macvim, which was not opening windows unlessed launched from the console with 'mvim'. Therefore, there is some incompatibility with mavericks and rvm, which causes problems with vim.
After hours of researching following different threads turns out there may be a ton of reasons causing vim to crash and getting that error message(not surprising!). But in my particular case after running it in verbose mode I realized there were stuff in my ~/.vimrc file that vim crashed because of. So very easily after removing my ~/.vimrc everything went back to normal and no more crashing. Just make sure you keep a back-up of it before removing in case you have customized your vim.

Resources