2019-05-26 22:45 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002119NetSurfAmiga-specificpublic2015-03-10 11:02
ReporterChris Young 
Assigned ToChris Young 
SeveritycrashReproducibilityalways 
StatusclosedResolutionfixed 
PlatformAmigaOSAmigaOSOS Version4.1
Product Version3.2 
Target Version3.2Fixed in Version3.2 
Summary0002119: Crash in amiga_vmkpath
DescriptionNetSurf crashes on startup in amiga_vmkpath()
Steps To ReproduceLaunch NetSurf.
Additional InformationStack trace:
    native kernel module newlib.library.kmod+0x00003164
    [amiga/gui.c:284] amiga_vmkpath()+0x124 (section 1 @ 0x10850)
    [amiga/gui.c:403] ami_gui_map_filename()+0x70 (section 1 @ 0x126AC)
    [amiga/gui.c:368] ami_locale_langs()+0xb4 (section 1 @ 0x12950)
    [amiga/gui.c:670] ami_set_options()+0x48 (section 1 @ 0x12A70)
    [utils/nsoption.c:527] nsoption_init()+0x6c (section 1 @ 0xF20F4)
    [amiga/gui.c:5292] main()+0x274 (section 1 @ 0x1D370)
    native kernel module newlib.library.kmod+0x000020ac
    native kernel module newlib.library.kmod+0x00002d5c
    native kernel module newlib.library.kmod+0x00002ef0
    _start()+0x170 (section 1 @ 0x16C)
    native kernel module dos.library.kmod+0x00024cd0
    native kernel module kernel+0x0003b4b0
    native kernel module kernel+0x0003b530
TagsNo tags attached.
Fixed in CI build #1862
Reported in CI build #1855
URL of problem page
Attached Files
  • txt file icon Crashlog_NetSurf_2014-05-08_17-45-52.txt (3,170 bytes) 2014-05-08 17:52 -
    Crash log for task "NetSurf"
    Generated by GrimReaper 53.16
    Crash occured in module newlib.library.kmod at address 0x0163A164
    Type of crash: DSI (Data Storage Interrupt) exception
    
    Register dump:
    GPR (General Purpose Registers):
       0: 5FFAE000 58D2C1D0 00000000 21C00680 58D2FA8C 00000011 4449523A 50524F47 
       8: 21C0067C 00000004 549B8E10 0163A12C 00000798 549D1E5C 00000000 59DD5340 
      16: 6E7C6120 00000000 00000000 00340014 01E70000 58DA5E94 549D0000 549D0000 
      24: 58D2C2FC 58D2C2F8 00000008 0000001C 21C00680 00000002 58D2C288 00000011 
    
    
    FPR (Floating Point Registers, NaN = Not a Number):
       0:              nan              842              593              366 
       4:               31            383.8             76.8              366 
       8:               31              128            383.8              255 
      12:              nan            65536                0                0 
      16:                0                0                0                0 
      20:                0     4.34638e-311                0                0 
      24:                0                0                0    -2.97403e+284 
      28:                0                0                0    -2.63889e+270 
    
    FPSCR (Floating Point Status and Control Register): 0x82000000
    
    
    SPRs (Special Purpose Registers):
               Machine State (msr) : 0x0002F030
                    Condition (cr) : 0x54291608
          Instruction Pointer (ip) : 0x0163A164
           Xtended Exception (xer) : 0x59269F14
                       Count (ctr) : 0x5FF924D0
                         Link (lr) : 0x6FA52918
                DSI Status (dsisr) : 0x542913C0
                Data Address (dar) : 0x015AAF8C
    
    
    
    680x0 emulated registers:
    DATA: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    ADDR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    FPU0:                0                0                0                0 
    FPU4:                0                0                0                0 
    
    
    
    Symbol info:
    Instruction pointer 0x0163A164 belongs to module "newlib.library.kmod" (HUNK/Kickstart)
    
    Stack trace:
        native kernel module newlib.library.kmod+0x00003164
        [amiga/gui.c:284] amiga_vmkpath()+0x124 (section 1 @ 0x10850)
        [amiga/gui.c:403] ami_gui_map_filename()+0x70 (section 1 @ 0x126AC)
        [amiga/gui.c:368] ami_locale_langs()+0xb4 (section 1 @ 0x12950)
        [amiga/gui.c:670] ami_set_options()+0x48 (section 1 @ 0x12A70)
        [utils/nsoption.c:527] nsoption_init()+0x6c (section 1 @ 0xF20F4)
        [amiga/gui.c:5292] main()+0x274 (section 1 @ 0x1D370)
        native kernel module newlib.library.kmod+0x000020ac
        native kernel module newlib.library.kmod+0x00002d5c
        native kernel module newlib.library.kmod+0x00002ef0
        _start()+0x170 (section 1 @ 0x16C)
        native kernel module dos.library.kmod+0x00024cd0
        native kernel module kernel+0x0003b4b0
        native kernel module kernel+0x0003b530
    
    PPC disassembly:
     0163a15c: 42400014   bdz-              0x163A170
     0163a160: 84c40004   lwzu              r6,4(r4)
    *0163a164: 94e80004   stwu              r7,4(r8)
     0163a168: 4200ffec   bdnz+             0x163A154
     0163a16c: 7cc73378   mr                r7,r6
    
    txt file icon Crashlog_NetSurf_2014-05-08_17-45-52.txt (3,170 bytes) 2014-05-08 17:52 +

-Relationships
+Relationships

-Notes
Vincent Sanders

~0000321

Vincent Sanders (administrator)

OK this is caused by my making the mkpath (used to be file_add_path go through the operations table.

I guess the core uses it before it is initialised.

the correct fix for this is to get the operation tables initialised as early as possible (instead of in ns_init() ). This also removes the need to have a NULL check in netsurf_mkpath() allowing it to be used withtin amiga/gui.c rather than having a separate amiga_mkpath()
Chris Young

~0000322

Chris Young (developer)

It appears to be the search for the Messages file which is causing the crash. This has to happen before ns_init as the path to Messages is passed to it, which ties in with what you have said.
Chris Young

~0000323

Chris Young (developer)

Calling gui_factory_register() just after nslog_init stops the crashing, but it still hangs and doesn't start up.
I suspect there's a memory trashing bug in vmkpath, but I can't immediately see anything wrong.
Chris Young

~0000324

Chris Young (developer)

CI build 1861 is giving me the same crash.

Stack trace:
    native kernel module newlib.library.kmod+0x00003164
    [amiga/gui.c:283] amiga_vmkpath()+0x124 (section 1 @ 0x10850)
    [amiga/gui.c:402] ami_gui_map_filename()+0x70 (section 1 @ 0x126AC)
    [amiga/gui.c:490] ami_locate_resource()+0x138 (section 1 @ 0x13268)
    [amiga/gui.c:5303] main()+0x2cc (section 1 @ 0x1D3C8)
    native kernel module newlib.library.kmod+0x000020ac
    native kernel module newlib.library.kmod+0x00002d5c
    native kernel module newlib.library.kmod+0x00002ef0
    _start()+0x170 (section 1 @ 0x16C)
    native kernel module dos.library.kmod+0x00024cd0
    native kernel module kernel+0x0003b4b0
    native kernel module kernel+0x0003b530

Line 283 which appears to be triggering this crash is actually a memmove:
[282] /* copy the first element complete */
[283] memmove(fname, elm[0], elm_len[0]);
[284] fname[elm_len[0]] = 0;
Chris Young

~0000325

Chris Young (developer)

Changed ami_gui_map_filename to leave amiga_mkpath to allocate the path buffer, rather than passing one to it.
Vincent Sanders

~0000697

Vincent Sanders (administrator)

Confirmed fixed in 3.2 release
+Notes

-Issue History
Date Modified Username Field Change
2014-05-08 17:52 Chris Young New Issue
2014-05-08 17:52 Chris Young Status new => assigned
2014-05-08 17:52 Chris Young Assigned To => Chris Young
2014-05-08 17:52 Chris Young File Added: Crashlog_NetSurf_2014-05-08_17-45-52.txt
2014-05-08 18:19 Vincent Sanders Note Added: 0000321
2014-05-08 18:19 Vincent Sanders Additional Information Updated View Revisions
2014-05-08 18:44 Chris Young Note Added: 0000322
2014-05-08 19:50 Chris Young Note Added: 0000323
2014-05-10 15:12 Chris Young Note Added: 0000324
2014-05-10 15:29 Chris Young Fixed in CI build # => 1862
2014-05-10 15:29 Chris Young Note Added: 0000325
2014-05-10 15:29 Chris Young Status assigned => resolved
2014-05-10 15:29 Chris Young Fixed in Version => 3.2
2014-05-10 15:29 Chris Young Resolution open => fixed
2015-03-10 11:02 Vincent Sanders Note Added: 0000697
2015-03-10 11:02 Vincent Sanders Status resolved => closed
+Issue History