[Mono-bugs] [Bug 655928] New: Occasional SIGSEGV and related NullReferenceException
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Nov 25 02:45:35 EST 2010
https://bugzilla.novell.com/show_bug.cgi?id=655928
https://bugzilla.novell.com/show_bug.cgi?id=655928#c0
Summary: Occasional SIGSEGV and related NullReferenceException
Classification: Mono
Product: Mono: Runtime
Version: SVN
Platform: i386
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: xacc.ide at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Blocker: ---
Created an attachment (id=402136)
--> (http://bugzilla.novell.com/attachment.cgi?id=402136)
IronScheme build with R6RS tests
Description of Problem:
Sorry for not having a smaller test case.
When running the attached problem, the program may:
1. Run correctly
2. Fail with a SIGSEGV.
3. Fail with a strange NullReferenceException
Steps to reproduce the problem:
1. Extract attachment
2. run echo '(ironscheme-test)' | ./IronScheme.Console.exe
Actual Results:
About half the time it completes successfully, otherwise one of the 2
aforementioned errors pop up. From what I noticed the NullReferenceException
can happen at different places. The SIGSEGV happens at the same place every
time. obj->vtable is NULL there.
Expected Results:
No crashes
How often does this happen?
Occasionally
Additional Information:
GDB output for 'NullReferenceException':
Program received signal SIGSEGV, Segmentation fault.
0x009b77cb in IronScheme.Runtime.Builtins:RequiresNotNull<T> (obj=<type
'exceptions.RuntimeError'>
Cannot access memory at address 0x0
<type 'exceptions.RuntimeError'>
Cannot access memory at address 0x0
3069276800) at xdb.il:68688
68688 IL_0035: isinst <StringBuilder>
(gdb) whe
#0 0x009b77cb in IronScheme.Runtime.Builtins:RequiresNotNull<T> (obj=<type
'exceptions.RuntimeError'>
Cannot access memory at address 0x0
<type 'exceptions.RuntimeError'>
Cannot access memory at address 0x0
3069276800) at xdb.il:68688
#1 0x00a6f787 in IronScheme.Runtime.Builtins:StringToNumber (obj=<type
'exceptions.RuntimeError'>
Cannot access memory at address 0x0
<type 'exceptions.RuntimeError'>
Cannot access memory at address 0x0
3069276800) at xdb.il:138532
#2 0x00b98456 in eval-core(103):tests.r6rs.base::run-base-tests () at
xdb.il:263334
#3 0x00b62483 in eval-core(104):$5324 () at xdb.il:243636
#4 0x00a2a7ec in Microsoft.Scripting.ScriptCode:Run (this=...,
codeContext=..., tryEvaluate=<value optimized out>) at xdb.il:119081
#5 0x00a2a742 in Microsoft.Scripting.ScriptCode:Run (this=..., module=...) at
xdb.il:119056
#6 0x00a2a6c9 in
IronScheme.Runtime.Builtins/<>c__DisplayClassa:<CompileCore>b__8 (this=...) at
xdb.il:119040
#7 0x00a13d1a in IronScheme.Runtime.Builtins:EvalCore (cc=...,
expr=IronScheme.Runtime.Cons = {...}) at xdb.il:110183
#8 0x00ae85ae in #:psyntax.expander::compile-r6rs-top-level#anon#1#2$2580
($context=...) at xdb.il:191612
#9 0x00a6ab99 in #:psyntax.main::load-r6rs-top-level#1#anon#1#2#3#4#5#6$2612
($context=...) at xdb.il:136073
#10 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#11 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#12 0x00a0b001 in IronScheme.Runtime.Closure/VarArgClosure:Call (this=...,
args=System.Object [2]) at xdb.il:102183
#13 0x00a67da2 in #:psyntax.main::load (filename="tests/r6rs/run.sps") at
xdb.il:134838
#14 0x00a67c7b in #:psyntax.main::ironscheme-test () at xdb.il:134821
#15 0x00a2a7ec in Microsoft.Scripting.ScriptCode:Run (this=...,
codeContext=..., tryEvaluate=<value optimized out>) at xdb.il:119081
#16 0x00a2a742 in Microsoft.Scripting.ScriptCode:Run (this=..., module=...) at
xdb.il:119056
#17 0x00a2a6c9 in
IronScheme.Runtime.Builtins/<>c__DisplayClassa:<CompileCore>b__8 (this=...) at
xdb.il:119040
#18 0x00a13d1a in IronScheme.Runtime.Builtins:EvalCore (cc=...,
expr=IronScheme.Runtime.Cons = {...}) at xdb.il:110183
#19 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#20 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#21 0x00a3b88f in ?? ()
#22 0x00a3b700 in ?? ()
#23 0x00a2a823 in Microsoft.Scripting.ScriptCode:Run (this=...,
codeContext=..., tryEvaluate=<value optimized out>) at xdb.il:119093
#24 0x00a2a742 in Microsoft.Scripting.ScriptCode:Run (this=..., module=...) at
xdb.il:119056
#25 0x00a37191 in ?? ()
#26 0x00a3b04c in ?? ()
#27 0x00a3afd3 in ?? ()
#28 0x00a2ecd8 in Microsoft.Scripting.Shell.CommandLine:RunOneInteraction
(this=...) at xdb.il:121090
#29 0x00a2eb18 in Microsoft.Scripting.Shell.CommandLine:TryInteractiveAction
(this=...) at xdb.il:121046
#30 0x00a2e960 in Microsoft.Scripting.Shell.CommandLine:RunInteractiveLoop
(this=...) at xdb.il:120992
#31 0x00a2e4c7 in Microsoft.Scripting.Shell.CommandLine:RunInteractive
(this=...) at xdb.il:120804
#32 0x00a2e46b in Microsoft.Scripting.Shell.CommandLine:Run (this=...) at
xdb.il:120789
#33 0x00a2e332 in Microsoft.Scripting.Shell.CommandLine:Run (this=...,
engine=..., console=..., options=...) at xdb.il:120745
#34 0x00a2db5e in Microsoft.Scripting.Hosting.ConsoleHost:RunCommandLine
(this=..., optionsParser=...) at xdb.il:120474
#35 0x00a2d2bc in Microsoft.Scripting.Hosting.ConsoleHost:ExecuteInternal
(this=...) at xdb.il:120228
#36 0x00a2d067 in Microsoft.Scripting.Hosting.ConsoleHost:Execute (this=...) at
xdb.il:120146
#37 0x007fb406 in Microsoft.Scripting.Hosting.ConsoleHost:Run (this=...,
args=string [0]) at xdb.il:777
#38 0x007f9e8b in IronScheme.Runtime.Program:Main (args=string [0]) at
xdb.il:121
#39 0x007fa018 in (wrapper runtime-invoke) <Module>:runtime_invoke_int_object
(param0=<value optimized out>, param1=-1073745864, param2=0, param3=8363072)
at xdb.il:159
---Type <return> to continue, or q <return> to quit---
#40 0x08062731 in mono_jit_runtime_invoke
(method="IronScheme.Runtime.Program:Main ()", obj=0x0, params=0xbffff038,
exc=0x0) at mini.c:5453
#41 0x081daeb3 in mono_runtime_invoke (method="IronScheme.Runtime.Program:Main
()", obj=0x0, params=0xbffff038, exc=0x0) at object.c:2714
#42 0x081dcf27 in mono_runtime_exec_main
(method="IronScheme.Runtime.Program:Main ()", args=0x3ce40, exc=0x0) at
object.c:3875
#43 0x081dc412 in mono_runtime_run_main
(method="IronScheme.Runtime.Program:Main ()", argc=0, argv=0xbffff330, exc=0x0)
at object.c:3505
#44 0x080ed11c in mono_jit_exec (domain=0x34e60, assembly=0x842c590, argc=1,
argv=0xbffff32c) at driver.c:941
#45 0x080ed31d in main_thread_handler (user_data=0xbffff150) at driver.c:1000
#46 0x080ef080 in mono_main (argc=3, argv=0xbffff324) at driver.c:1839
#47 0x080571b4 in mono_main_with_options (argc=3, argv=0xbffff324) at main.c:66
#48 0x080571db in main (argc=3, argv=0xbffff324) at main.c:97
(gdb) info args
obj = <type 'exceptions.RuntimeError'>
Cannot access memory at address 0x0
3069276800<type 'exceptions.RuntimeError'>
Cannot access memory at address 0x0
(gdb) c
Continuing.
Unhandled CLR exception during evaluation:
CLR Exception: System.NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an
object
at IronScheme.Runtime.Builtins.RequiresNotNull[String] (System.Object obj)
[0x00000] in <filename unknown>:0
at IronScheme.Runtime.Builtins.StringToNumber (System.Object obj) [0x00000]
in <filename unknown>:0
at eval-core(103).tests.r6rs.base::run-base-tests () [0x00000] in <filename
unknown>:0
at eval-core(104).$5324 () [0x00000] in <filename unknown>:0
at Microsoft.Scripting.ScriptCode.Run (Microsoft.Scripting.CodeContext
codeContext, Boolean tryEvaluate) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.ScriptCode.Run (Microsoft.Scripting.ScriptModule
module) [0x00000] in <filename unknown>:0
at IronScheme.Runtime.Builtins+<>c__DisplayClassa.<CompileCore>b__8 ()
[0x00000] in <filename unknown>:0
at IronScheme.Runtime.Builtins.EvalCore (Microsoft.Scripting.CodeContext cc,
System.Object expr) [0x00000] in <filename unknown>:0
at #.psyntax.expander::compile-r6rs-top-level#anon#1#2$2580
(Microsoft.Scripting.CodeContext $context) [0x00000] in <filename unknown>:0
at #.psyntax.main::load-r6rs-top-level#1#anon#1#2#3#4#5#6$2612
(Microsoft.Scripting.CodeContext $context) [0x00000] in <filename unknown>:0
at #.ironscheme.exceptions::dynamic-wind (System.Object in, System.Object
proc, System.Object out) [0x00000] in <filename unknown>:0
at #.ironscheme.exceptions::dynamic-wind (System.Object in, System.Object
proc, System.Object out) [0x00000] in <filename unknown>:0
at IronScheme.Runtime.Closure+VarArgClosure.Call (System.Object[] args)
[0x00000] in <filename unknown>:0
at #.psyntax.main::load (System.Object filename) [0x00000] in <filename
unknown>:0
at #.psyntax.main::ironscheme-test () [0x00000] in <filename unknown>:0
at Microsoft.Scripting.ScriptCode.Run (Microsoft.Scripting.CodeContext
codeContext, Boolean tryEvaluate) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.ScriptCode.Run (Microsoft.Scripting.ScriptModule
module) [0x00000] in <filename unknown>:0
at IronScheme.Runtime.Builtins+<>c__DisplayClassa.<CompileCore>b__8 ()
[0x00000] in <filename unknown>:0
at IronScheme.Runtime.Builtins.EvalCore (Microsoft.Scripting.CodeContext cc,
System.Object expr) [0x00000] in <filename unknown>:0
at #.ironscheme.exceptions::dynamic-wind (System.Object in, System.Object
proc, System.Object out) [0x00000] in <filename unknown>:0
at #.ironscheme.exceptions::dynamic-wind (System.Object in, System.Object
proc, System.Object out) [0x00000] in <filename unknown>:0
at IronScheme.Runtime.Builtins.CallWithCurrentContinuation (System.Object
fc1) [0x00000] in <filename unknown>:0
at IronScheme.Runtime.R6RS.Exceptions.WithClrExceptionHandler (System.Object
handler, System.Object thunk) [0x00000] in <filename unknown>:0
(the above stacktrace comes from IronScheme)
GDB output for 'SIGSEGV':
> (ironscheme-test)
Program received signal SIGSEGV, Segmentation fault.
0x08197c5b in resolve_object (image=0xb74e8000, obj=0xb6f1ad40,
handle_class=0xbfffd74c, context=0x0) at reflection.c:11746
11746 if (strcmp (obj->vtable->klass->name, "String") == 0) {
(gdb) whe
#0 0x08197c5b in resolve_object (image=0xb74e8000, obj=0xb6f1ad40,
handle_class=0xbfffd74c, context=0x0) at reflection.c:11746
#1 0x08197b8b in mono_reflection_lookup_dynamic_token (image=0xb74e8000,
token=1879050814, valid_token=1, handle_class=0xbfffd74c, context=0x0)
at reflection.c:11710
#2 0x081f5be9 in mono_lookup_dynamic_token (image=0xb74e8000,
token=1879050814, context=0x0) at class.c:7677
#3 0x081df0ca in mono_ldstr (domain=0x34e60, image=0xb74e8000, idx=2622) at
object.c:5245
#4 0x080a2b34 in mono_method_to_ir (cfg=0x90a7880,
method="eval-core(092):tests.r6rs.io.ports::run-io-ports-tests ()",
start_bblock=0x92a399c, end_bblock=
0x92a3a3c, return_var=0x0, dont_inline=0x90b4438, inline_args=0x0,
inline_offset=0, is_virtual_call=0) at method-to-ir.c:7826
#5 0x0805f86b in mini_method_compile
(method="eval-core(092):tests.r6rs.io.ports::run-io-ports-tests ()",
opts=59861503, domain=0x34e60, run_cctors=1,
compile_aot=0, parts=0) at mini.c:4163
#6 0x0806127f in mono_jit_compile_method_inner
(method="eval-core(092):tests.r6rs.io.ports::run-io-ports-tests ()",
target_domain=0x34e60, opt=59861503,
jit_ex=0xbfffe3fc) at mini.c:4867
#7 0x08061cc7 in mono_jit_compile_method_with_opt
(method="eval-core(092):tests.r6rs.io.ports::run-io-ports-tests ()",
opt=59861503, ex=0xbfffe3fc)
at mini.c:5090
#8 0x08061e21 in mono_jit_compile_method
(method="eval-core(092):tests.r6rs.io.ports::run-io-ports-tests ()") at
mini.c:5115
#9 0x081d6897 in mono_compile_method
(method="eval-core(092):tests.r6rs.io.ports::run-io-ports-tests ()") at
object.c:565
#10 0x081171da in common_call_trampoline (regs=0xbfffe558, code=0xb627a6
"\213\005\320H\003", m="eval-core(092):tests.r6rs.io.ports::run-io-ports-tests
()",
tramp=0x0, vt=0x0, vtable_slot=0x0, need_rgctx_tramp=0) at
mini-trampolines.c:477
#11 0x08117691 in mono_magic_trampoline (regs=0xbfffe558, code=0xb627a6
"\213\005\320H\003", arg=0x979b00c, tramp=0x0) at mini-trampolines.c:579
#12 0x002da066 in generic_trampoline_jit ()
#13 0x00b627a6 in eval-core(104):$5324 () at xdb.il:243735
#14 0x00a2a7ec in Microsoft.Scripting.ScriptCode:Run (this=...,
codeContext=..., tryEvaluate=<value optimized out>) at xdb.il:119081
#15 0x00a2a742 in Microsoft.Scripting.ScriptCode:Run (this=..., module=...) at
xdb.il:119056
#16 0x00a2a6c9 in
IronScheme.Runtime.Builtins/<>c__DisplayClassa:<CompileCore>b__8 (this=...) at
xdb.il:119040
#17 0x00a13d1a in IronScheme.Runtime.Builtins:EvalCore (cc=...,
expr=IronScheme.Runtime.Cons = {...}) at xdb.il:110183
#18 0x00ae85ae in #:psyntax.expander::compile-r6rs-top-level#anon#1#2$2580
($context=...) at xdb.il:191612
#19 0x00a6ab99 in #:psyntax.main::load-r6rs-top-level#1#anon#1#2#3#4#5#6$2612
($context=...) at xdb.il:136073
#20 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#21 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#22 0x00a0b001 in IronScheme.Runtime.Closure/VarArgClosure:Call (this=...,
args=System.Object [2]) at xdb.il:102183
#23 0x00a67da2 in #:psyntax.main::load (filename="tests/r6rs/run.sps") at
xdb.il:134838
#24 0x00a67c7b in #:psyntax.main::ironscheme-test () at xdb.il:134821
#25 0x00a2a7ec in Microsoft.Scripting.ScriptCode:Run (this=...,
codeContext=..., tryEvaluate=<value optimized out>) at xdb.il:119081
#26 0x00a2a742 in Microsoft.Scripting.ScriptCode:Run (this=..., module=...) at
xdb.il:119056
#27 0x00a2a6c9 in
IronScheme.Runtime.Builtins/<>c__DisplayClassa:<CompileCore>b__8 (this=...) at
xdb.il:119040
#28 0x00a13d1a in IronScheme.Runtime.Builtins:EvalCore (cc=...,
expr=IronScheme.Runtime.Cons = {...}) at xdb.il:110183
#29 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#30 0x00a0cb99 in #:ironscheme.exceptions::dynamic-wind (in=ContextClosure =
{...}, proc=ContextClosure = {...}, out=ContextClosure = {...}) at
xdb.il:103014
#31 0x00a3b88f in ?? ()
#32 0x00a3b700 in ?? ()
#33 0x00a2a823 in Microsoft.Scripting.ScriptCode:Run (this=...,
codeContext=..., tryEvaluate=<value optimized out>) at xdb.il:119093
#34 0x00a2a742 in Microsoft.Scripting.ScriptCode:Run (this=..., module=...) at
xdb.il:119056
#35 0x00a37191 in ?? ()
#36 0x00a3b04c in ?? ()
#37 0x00a3afd3 in ?? ()
#38 0x00a2ecd8 in Microsoft.Scripting.Shell.CommandLine:RunOneInteraction
(this=...) at xdb.il:121090
#39 0x00a2eb18 in Microsoft.Scripting.Shell.CommandLine:TryInteractiveAction
(this=...) at xdb.il:121046
#40 0x00a2e960 in Microsoft.Scripting.Shell.CommandLine:RunInteractiveLoop
(this=...) at xdb.il:120992
#41 0x00a2e4c7 in Microsoft.Scripting.Shell.CommandLine:RunInteractive
(this=...) at xdb.il:120804
#42 0x00a2e46b in Microsoft.Scripting.Shell.CommandLine:Run (this=...) at
xdb.il:120789
---Type <return> to continue, or q <return> to quit---q
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list