9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mk results in rc: suicide:
@ 2024-07-04 13:43 Marco Feichtinger
  2024-07-04 14:27 ` Alexander Kapshuk
  0 siblings, 1 reply; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-04 13:43 UTC (permalink / raw)
  To: 9fans

Trying to compile a kernel on a local fossil machine,
I get following errors during the build
        rc: 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
        mk: 8c -I../boot -FTVw ../boot/printstub.c : exit status=rc 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9

At the same time /dev/kprint outputs 
        1844 rc: checked 20 page table entries

Every time i retried to compile, that error comes up, but on different steps during the build.
It even happens during 'mk clean'.

One time i even got
        rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c
        mk: 8c -I../boot -FTVw ../port/print.c: exit status=rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c

What do these error mean?

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mf907951987cf14e1b45d4b28
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 13:43 [9fans] mk results in rc: suicide: Marco Feichtinger
@ 2024-07-04 14:27 ` Alexander Kapshuk
  2024-07-04 15:19   ` wb.kloke
  0 siblings, 1 reply; 24+ messages in thread
From: Alexander Kapshuk @ 2024-07-04 14:27 UTC (permalink / raw)
  To: marco; +Cc: 9fans

On Thu, Jul 4, 2024 at 4:44 PM Marco Feichtinger <marco@germteig.com> wrote:
> 
> Trying to compile a kernel on a local fossil machine,
> I get following errors during the build
>         rc: 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
>         mk: 8c -I../boot -FTVw ../boot/printstub.c : exit status=rc 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
> 
> At the same time /dev/kprint outputs
>         1844 rc: checked 20 page table entries
> 
> Every time i retried to compile, that error comes up, but on different steps during the build.
> It even happens during 'mk clean'.
> 
> One time i even got
>         rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c
>         mk: 8c -I../boot -FTVw ../port/print.c: exit status=rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c
> 
> What do these error mean?
> 
> -marco
> 

Inspecting the process in the debugger might be insightful.
The Debugging section of https://9p.io/sys/doc/comp.pdf demonstrates
how to do it, and the error message exemplified is very similar to
what you got.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mfb345e61d3b891c4ee4ba725
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 14:27 ` Alexander Kapshuk
@ 2024-07-04 15:19   ` wb.kloke
  2024-07-04 18:44     ` Marco Feichtinger
  0 siblings, 1 reply; 24+ messages in thread
From: wb.kloke @ 2024-07-04 15:19 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

The symptoms look like disk full error.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M5f914074957df945a1b6432a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 761 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 15:19   ` wb.kloke
@ 2024-07-04 18:44     ` Marco Feichtinger
  2024-07-04 19:54       ` Dave Eckhardt
  0 siblings, 1 reply; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-04 18:44 UTC (permalink / raw)
  To: 9fans

Thanks for the hints.

I don't believe that this is a disk full error,
since it's a fresh install on a 16GB SATADOM.

Now following crash during mk:
       rc: 2819: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
       mk: 8c -FTVw pcf.rootc.c : exit status=rc 2819: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9

So I tried acid.
        % acid 2819
        /proc/2819/text:386 plan 9 executable
        /sys/lib/acid/port
        /sys/lib/acid/386
        acid: src(0x0000b5d9)
        /sys/src/cmd/rc/plan9.c:476
                471                     int n;
                472
                473                     if(f<0 || f>=NFD)
                474                             return 0;
                475             Again:
                >476            if(dir[f].i==dir[f].n){ /* read */
                477                             free(dir[f].dbuf);
                478                             dir[f].dbuf = 0;
                479                             n = dirread(f, &dir[f].dbuf);
                480                             if(n>0){
                481                                     if(onlydirs){
        acid: stk()
        <stdin>:2: (error) no stack frame: './acid' file does not exist

I have no idea what that means.
Also, I don't understand acid well enough to use correctly, so i need to play more with it.

What's interesting is, when I set the window to 'noscroll', run mk, and manually 
scroll down the window, I get the kernel build without crashing.
If I scroll down too fast, it crashes.

-marco



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M36a7c66c644662bf6ec85728
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 18:44     ` Marco Feichtinger
@ 2024-07-04 19:54       ` Dave Eckhardt
  2024-07-04 19:57         ` Charles Forsyth
  0 siblings, 1 reply; 24+ messages in thread
From: Dave Eckhardt @ 2024-07-04 19:54 UTC (permalink / raw)
  To: 9fans

If it were my machine I would probably run a RAM tester overnight.

Dave Eckhardt

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M02fac44b503b2dfc5c1be904
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 19:54       ` Dave Eckhardt
@ 2024-07-04 19:57         ` Charles Forsyth
  2024-07-05  1:32           ` ibrahim via 9fans
  2024-07-05  1:47           ` ibrahim via 9fans
  0 siblings, 2 replies; 24+ messages in thread
From: Charles Forsyth @ 2024-07-04 19:57 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

yes, i'd suspect RAM or RAM setup

On Thu, 4 Jul 2024 at 20:55, Dave Eckhardt <davide+p9@cs.cmu.edu> wrote:

> If it were my machine I would probably run a RAM tester overnight.
> 
> Dave Eckhardt

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M1d97d3b43535c1d4014c1d9f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1645 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 19:57         ` Charles Forsyth
@ 2024-07-05  1:32           ` ibrahim via 9fans
  2024-07-05  1:47           ` ibrahim via 9fans
  1 sibling, 0 replies; 24+ messages in thread
From: ibrahim via 9fans @ 2024-07-05  1:32 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

I made this experience some time ago and suspect one of your static libraries didn't get rebuild. To verify this have a look in your /386/lib folder and verify the timestamp of your libraries. If you find the culprit manually change to that library and do "mk nuke ; mk ; mk install".

I would guess you tried to add a system call to the kernel and your libc wasn't rebuild - but thats only a guess.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M87a7792e7cf56899ef10fb12
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1161 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 19:57         ` Charles Forsyth
  2024-07-05  1:32           ` ibrahim via 9fans
@ 2024-07-05  1:47           ` ibrahim via 9fans
  2024-07-07 14:15             ` Marco Feichtinger
  1 sibling, 1 reply; 24+ messages in thread
From: ibrahim via 9fans @ 2024-07-05  1:47 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

To avoid such problems while rebuilding kernels + libraries + commands you can use namespaces or some tricks as in http://9p.io/wiki/plan9/compiling_kernels/index.html 

There is also divergefs for plan9 which I personally don't use but you can give it a try.

Avoid recompiling your kernel, libraries and commands directly in /sys/src.

Good luck
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M60506689a3962f863de10655
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1235 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-05  1:47           ` ibrahim via 9fans
@ 2024-07-07 14:15             ` Marco Feichtinger
  2024-07-07 14:23               ` ori
  2024-07-07 16:22               ` Dave Eckhardt
  0 siblings, 2 replies; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-07 14:15 UTC (permalink / raw)
  To: 9fans

Thanks for the help guys, but unfortunately I couldn't figure it out yet.

I did run MemTest86, which passed; no errors. 
I also tried a different RAM module, but got the same error.

The timestamp of the libraries in /386/lib looks fine.

> To avoid such problems while rebuilding kernels + libraries + commands you can use namespaces or some tricks as in http://9p.io/wiki/plan9/compiling_kernels/index.html
Thanks for the link. 
I tried it, but with the same result.

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M74cc8958c69e717aa8645afc
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 14:15             ` Marco Feichtinger
@ 2024-07-07 14:23               ` ori
  2024-07-07 15:36                 ` Marco Feichtinger
  2024-07-07 16:22               ` Dave Eckhardt
  1 sibling, 1 reply; 24+ messages in thread
From: ori @ 2024-07-07 14:23 UTC (permalink / raw)
  To: 9fans

Have you looked at the crashed binary in acid, and checked if the
PC seems to be pointing at something sensible? Do you get a sane
stack trace?

Can you post it?

Quoth Marco Feichtinger <marco@germteig.com>:
> Thanks for the help guys, but unfortunately I couldn't figure it out yet.
> 
> I did run MemTest86, which passed; no errors. 
> I also tried a different RAM module, but got the same error.
> 
> The timestamp of the libraries in /386/lib looks fine.
> 
> > To avoid such problems while rebuilding kernels + libraries + commands you can use namespaces or some tricks as in http://9p.io/wiki/plan9/compiling_kernels/index.html
> Thanks for the link.
> I tried it, but with the same result.
> 
> -marco
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M1b5b098f70fbd4041d744643
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 14:23               ` ori
@ 2024-07-07 15:36                 ` Marco Feichtinger
  2024-07-09 16:19                   ` Ori Bernstein
  0 siblings, 1 reply; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-07 15:36 UTC (permalink / raw)
  To: 9fans

Error during compiling:
        rc 718: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
        mk: 8c -FTVw mtrr.c  : exit status=rc 718: sys: trap: fault read addr=0x965708 pc=0x0000b5d9

acid:
        term% acid 718
        /proc/718/text:386 plan 9 executable
        /sys/lib/acid/port
        /sys/lib/acid/386
        acid: src(0x0000b5d9)
        /sys/src/cmd/rc/plan9.c:476
         471            int n;
         472    
         473            if(f<0 || f>=NFD)
         474                    return 0;
         475    Again:
        >476            if(dir[f].i==dir[f].n){ /* read */
         477                    free(dir[f].dbuf);
         478                    dir[f].dbuf = 0;
         479                    n = dirread(f, &dir[f].dbuf);
         480                    if(n>0){
         481                            if(onlydirs){
        acid: regs()
        PC      0x0000b5d9 Readdir+0x2d  /sys/src/cmd/rc/plan9.c:476
        SP      0xdfffeea3 ECODE 0x00000004 EFLAG 0x00010286
        CS      0x00000023 DS    0x0000001b SS  0x0000001b
        GS      0x0000001b FS    0x0000001b ES  0x0000001b
        TRAP    0x0000000e page fault
        AX      0xdfffef00 BX   0x00965700 CX   0x00000214 DX   0x00040b20
        DI      0x00016ca7 SI   0x00155720 BP   0x000176c8
        acid: 

I didn't get any wiser.

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mc70655e9f948394f4a04c002
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 14:15             ` Marco Feichtinger
  2024-07-07 14:23               ` ori
@ 2024-07-07 16:22               ` Dave Eckhardt
  2024-07-07 17:24                 ` wb.kloke
  2024-07-07 18:23                 ` Marco Feichtinger
  1 sibling, 2 replies; 24+ messages in thread
From: Dave Eckhardt @ 2024-07-07 16:22 UTC (permalink / raw)
  To: 9fans

> I did run MemTest86, which passed; no errors.

Not to be a pain, but did you run it for at least 12 hours?
Sadly, it can take that long or longer to uncover a marginal
module.  A really-horribly-bad module will fail in the first
run, but you may not be that "lucky".

Dave Eckhardt

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M9b47d06348b1f258e2d48066
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 16:22               ` Dave Eckhardt
@ 2024-07-07 17:24                 ` wb.kloke
  2024-07-07 18:23                   ` Marco Feichtinger
  2024-07-07 18:23                 ` Marco Feichtinger
  1 sibling, 1 reply; 24+ messages in thread
From: wb.kloke @ 2024-07-07 17:24 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

What about swap memory?

I wonder, why the process works, if slowed down by manual scrolling.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M208a397f8c49e88256d1dacf
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 841 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 16:22               ` Dave Eckhardt
  2024-07-07 17:24                 ` wb.kloke
@ 2024-07-07 18:23                 ` Marco Feichtinger
  1 sibling, 0 replies; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-07 18:23 UTC (permalink / raw)
  To: 9fans

> Not to be a pain, but did you run it for at least 12 hours?
No.
But I did run 4 iterations, which took about 5 hours.

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mfe0ec20cf84cbc0273833982
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 17:24                 ` wb.kloke
@ 2024-07-07 18:23                   ` Marco Feichtinger
  2024-07-09  9:09                     ` wb.kloke
  0 siblings, 1 reply; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-07 18:23 UTC (permalink / raw)
  To: 9fans

> What about swap memory?
No swap.

-marco

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M3f20653e6d91dd306ae7752f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 18:23                   ` Marco Feichtinger
@ 2024-07-09  9:09                     ` wb.kloke
  2024-07-09 11:30                       ` Charles Forsyth
  0 siblings, 1 reply; 24+ messages in thread
From: wb.kloke @ 2024-07-09  9:09 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

On Sunday, 7 July 2024, at 8:23 PM, Marco Feichtinger wrote:
> No swap.
Are you sure that this is not your problem?
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M7ef5bb5a39e349ab52bf1cf0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 887 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-09  9:09                     ` wb.kloke
@ 2024-07-09 11:30                       ` Charles Forsyth
  0 siblings, 0 replies; 24+ messages in thread
From: Charles Forsyth @ 2024-07-09 11:30 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

it will say out of physical memory or some such thing if that's the problem.

On Tue, 9 Jul 2024 at 11:25, <wb.kloke@gmail.com> wrote:

> On Sunday, 7 July 2024, at 8:23 PM, Marco Feichtinger wrote:
>
> No swap.
>
> Are you sure that this is not your problem?
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M7ef5bb5a39e349ab52bf1cf0>
>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Me36fc613a0b102ecedbf156f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1282 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 15:36                 ` Marco Feichtinger
@ 2024-07-09 16:19                   ` Ori Bernstein
  2024-07-13  7:11                     ` Marco Feichtinger
  0 siblings, 1 reply; 24+ messages in thread
From: Ori Bernstein @ 2024-07-09 16:19 UTC (permalink / raw)
  To: 9fans; +Cc: Marco Feichtinger

The useful hints will be in lstk() (does
the stack look sane), as well as in the
disassembly of the code (asm(Readdir), casm())

It seems unlikely that 'f' is out of
bounds, given the bounds check above,
which makes me suspect a corrupted binary.

On Sun, 7 Jul 2024 17:36:35 +0200
Marco Feichtinger <marco@germteig.com> wrote:

> Error during compiling:
>         rc 718: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
>         mk: 8c -FTVw mtrr.c  : exit status=rc 718: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
> 
> acid:
>         term% acid 718
>         /proc/718/text:386 plan 9 executable
>         /sys/lib/acid/port
>         /sys/lib/acid/386
>         acid: src(0x0000b5d9)
>         /sys/src/cmd/rc/plan9.c:476
>          471            int n;
>          472    
>          473            if(f<0 || f>=NFD)
>          474                    return 0;
>          475    Again:
>         >476            if(dir[f].i==dir[f].n){ /* read */
> 477                    free(dir[f].dbuf);
> 478                    dir[f].dbuf = 0;
> 479                    n = dirread(f, &dir[f].dbuf);
> 480                    if(n>0){
> 481                            if(onlydirs){
> acid: regs()
> PC      0x0000b5d9 Readdir+0x2d  /sys/src/cmd/rc/plan9.c:476
> SP      0xdfffeea3 ECODE 0x00000004 EFLAG 0x00010286
> CS      0x00000023 DS    0x0000001b SS  0x0000001b
> GS      0x0000001b FS    0x0000001b ES  0x0000001b
> TRAP    0x0000000e page fault
> AX      0xdfffef00 BX   0x00965700 CX   0x00000214 DX   0x00040b20
> DI      0x00016ca7 SI   0x00155720 BP   0x000176c8
> acid:
> 
> I didn't get any wiser.
> 
> -marco
> 


-- 
Ori Bernstein <ori@eigenstate.org>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Md46471297fafa3051bd167f4
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-09 16:19                   ` Ori Bernstein
@ 2024-07-13  7:11                     ` Marco Feichtinger
  2024-07-13  8:14                       ` Alexander Kapshuk
  2024-07-14  1:06                       ` ori
  0 siblings, 2 replies; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-13  7:11 UTC (permalink / raw)
  To: 9fans

This is what acid prints out:
        rc 505: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
        mk: 8c -FTVw -I. ../port/devcons.c  : exit status=rc 505: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
        term%
        term% acid 505
        /proc/505/text:386 plan 9 executable
        /sys/lib/acid/port
        /sys/lib/acid/386
        acid: lstk()
        <stdin>:2: (error) no stack frame: './acid' file does not exist
        acid: asm(Readdir)
        Readdir 0x0000b5ac SUBL $0xc,SP
        Readdir+0x3 0x0000b5af  MOVL    f+0x0(FP),BX
        Readdir+0x7 0x0000b5b3  CMPL    BX,$0x0
        Readdir+0xa 0x0000b5b6  JLT     Readdir+0x160(SB)
        Readdir+0x10 0x0000b5bc CMPL    BX,$0x32
        Readdir+0x13 0x0000b5bf JGE     Readdir+0x160(SB)
        Readdir+0x19 0x0000b5c5 LEAL    0x0(BX)(BX*2),CX
        Readdir+0x1c 0x0000b5c8 SHLL    $0x2,CX
        Readdir+0x1f 0x0000b5cb MOVL    dir+0x4(SB)(CX*1),AX
        Readdir+0x26 0x0000b5d2 LEAL    0x0(BX)(BX*2),CX
        Readdir+0x29 0x0000b5d5 SHLL    $0x2,CX
        Readdir+0x2c 0x0000b5d8 CMPL    dir+0x8(SB)(CX*1),AX
        Readdir+0x33 0x0000b5df JNE     Readdir+0xd8(SB)
        Readdir+0x39 0x0000b5e5 LEAL    0x0(BX)(BX*2),CX
        Readdir+0x3c 0x0000b5e8 SHLL    $0x2,CX
        Readdir+0x3f 0x0000b5eb MOVL    dir(SB)(CX*1),AX
        Readdir+0x46 0x0000b5f2 MOVL    AX,0x0(SP)
        Readdir+0x49 0x0000b5f5 CALL    free(SB)
        Readdir+0x4e 0x0000b5fa MOVL    f+0x0(FP),BX
        Readdir+0x52 0x0000b5fe LEAL    0x0(BX)(BX*2),AX
        Readdir+0x55 0x0000b601 SHLL    $0x2,AX
        Readdir+0x58 0x0000b604 MOVL    $0x0,dir(SB)(AX*1)
        Readdir+0x63 0x0000b60f MOVL    BX,0x0(SP)
        Readdir+0x66 0x0000b612 LEAL    0x0(BX)(BX*2),DX
        Readdir+0x69 0x0000b615 SHLL    $0x2,DX
        Readdir+0x6c 0x0000b618 LEAL    dir(SB)(DX*1),CX
        Readdir+0x73 0x0000b61f MOVL    CX,0x4(SP)
        Readdir+0x77 0x0000b623 CALL    dirread(SB)
        Readdir+0x7c 0x0000b628 MOVL    f+0x0(FP),BX
        Readdir+0x80 0x0000b62c MOVL    AX,BP
        acid: casm()
        Readdir+0x82 0x0000b62e CMPL    AX,$0x0
        Readdir+0x85 0x0000b631 JLE     Readdir+0x14a(SB)
        Readdir+0x8b 0x0000b637 CMPL    onlydirs+0x8(FP),$0x0
        Readdir+0x90 0x0000b63c JEQ     Readdir+0xba(SB)
        Readdir+0x92 0x0000b63e LEAL    0x0(BX)(BX*2),DX
        Readdir+0x95 0x0000b641 SHLL    $0x2,DX
        Readdir+0x98 0x0000b644 MOVL    dir(SB)(DX*1),CX
        Readdir+0x9f 0x0000b64b MOVL    CX,0x0(SP)
        Readdir+0xa2 0x0000b64e MOVL    BP,0x4(SP)
        Readdir+0xa6 0x0000b652 CALL    trimdirs(SB)
        Readdir+0xab 0x0000b657 MOVL    f+0x0(FP),BX
        Readdir+0xaf 0x0000b65b MOVL    AX,BP
        Readdir+0xb1 0x0000b65d CMPL    AX,$0x0
        Readdir+0xb4 0x0000b660 JEQ     Readdir+0x19(SB)
        Readdir+0xba 0x0000b666 LEAL    0x0(BX)(BX*2),CX
        Readdir+0xbd 0x0000b669 SHLL    $0x2,CX
        Readdir+0xc0 0x0000b66c MOVL    BP,dir+0x8(SB)(CX*1)
        Readdir+0xc7 0x0000b673 LEAL    0x0(BX)(BX*2),AX
        Readdir+0xca 0x0000b676 SHLL    $0x2,AX
        Readdir+0xcd 0x0000b679 MOVL    $0x0,dir+0x4(SB)(AX*1)
        Readdir+0xd8 0x0000b684 LEAL    0x0(BX)(BX*2),CX
        Readdir+0xdb 0x0000b687 SHLL    $0x2,CX
        Readdir+0xde 0x0000b68a MOVL    dir+0x4(SB)(CX*1),AX
        Readdir+0xe5 0x0000b691 LEAL    0x0(BX)(BX*2),CX
        Readdir+0xe8 0x0000b694 SHLL    $0x2,CX
        Readdir+0xeb 0x0000b697 CMPL    dir+0x8(SB)(CX*1),AX
        Readdir+0xf2 0x0000b69e JNE     Readdir+0xfa(SB)
        Readdir+0xf4 0x0000b6a0 XORL    AX,AX
        Readdir+0xf6 0x0000b6a2 ADDL    $0xc,SP
        Readdir+0xf9 0x0000b6a5 RET
        acid: 

I am lost here. 
I read the acid manual, but I still don't know what this output is about.

-marco




------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M6ab88f4078e6e884d88d2c37
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-13  7:11                     ` Marco Feichtinger
@ 2024-07-13  8:14                       ` Alexander Kapshuk
  2024-07-13 16:41                         ` Marco Feichtinger
  2024-07-14  1:06                       ` ori
  1 sibling, 1 reply; 24+ messages in thread
From: Alexander Kapshuk @ 2024-07-13  8:14 UTC (permalink / raw)
  To: 9fans

On Sat, Jul 13, 2024 at 10:13 AM Marco Feichtinger <marco@germteig.com> wrote:
> 
> This is what acid prints out:
>         rc 505: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
>         mk: 8c -FTVw -I. ../port/devcons.c  : exit status=rc 505: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
>         term%
>         term% acid 505
>         /proc/505/text:386 plan 9 executable
>         /sys/lib/acid/port
>         /sys/lib/acid/386
>         acid: lstk()
>         <stdin>:2: (error) no stack frame: './acid' file does not exist
>         acid: asm(Readdir)
>         Readdir 0x0000b5ac SUBL $0xc,SP
>         Readdir+0x3 0x0000b5af  MOVL    f+0x0(FP),BX
>         Readdir+0x7 0x0000b5b3  CMPL    BX,$0x0
>         Readdir+0xa 0x0000b5b6  JLT     Readdir+0x160(SB)
>         Readdir+0x10 0x0000b5bc CMPL    BX,$0x32
>         Readdir+0x13 0x0000b5bf JGE     Readdir+0x160(SB)
>         Readdir+0x19 0x0000b5c5 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0x1c 0x0000b5c8 SHLL    $0x2,CX
>         Readdir+0x1f 0x0000b5cb MOVL    dir+0x4(SB)(CX*1),AX
>         Readdir+0x26 0x0000b5d2 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0x29 0x0000b5d5 SHLL    $0x2,CX
>         Readdir+0x2c 0x0000b5d8 CMPL    dir+0x8(SB)(CX*1),AX
>         Readdir+0x33 0x0000b5df JNE     Readdir+0xd8(SB)
>         Readdir+0x39 0x0000b5e5 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0x3c 0x0000b5e8 SHLL    $0x2,CX
>         Readdir+0x3f 0x0000b5eb MOVL    dir(SB)(CX*1),AX
>         Readdir+0x46 0x0000b5f2 MOVL    AX,0x0(SP)
>         Readdir+0x49 0x0000b5f5 CALL    free(SB)
>         Readdir+0x4e 0x0000b5fa MOVL    f+0x0(FP),BX
>         Readdir+0x52 0x0000b5fe LEAL    0x0(BX)(BX*2),AX
>         Readdir+0x55 0x0000b601 SHLL    $0x2,AX
>         Readdir+0x58 0x0000b604 MOVL    $0x0,dir(SB)(AX*1)
>         Readdir+0x63 0x0000b60f MOVL    BX,0x0(SP)
>         Readdir+0x66 0x0000b612 LEAL    0x0(BX)(BX*2),DX
>         Readdir+0x69 0x0000b615 SHLL    $0x2,DX
>         Readdir+0x6c 0x0000b618 LEAL    dir(SB)(DX*1),CX
>         Readdir+0x73 0x0000b61f MOVL    CX,0x4(SP)
>         Readdir+0x77 0x0000b623 CALL    dirread(SB)
>         Readdir+0x7c 0x0000b628 MOVL    f+0x0(FP),BX
>         Readdir+0x80 0x0000b62c MOVL    AX,BP
>         acid: casm()
>         Readdir+0x82 0x0000b62e CMPL    AX,$0x0
>         Readdir+0x85 0x0000b631 JLE     Readdir+0x14a(SB)
>         Readdir+0x8b 0x0000b637 CMPL    onlydirs+0x8(FP),$0x0
>         Readdir+0x90 0x0000b63c JEQ     Readdir+0xba(SB)
>         Readdir+0x92 0x0000b63e LEAL    0x0(BX)(BX*2),DX
>         Readdir+0x95 0x0000b641 SHLL    $0x2,DX
>         Readdir+0x98 0x0000b644 MOVL    dir(SB)(DX*1),CX
>         Readdir+0x9f 0x0000b64b MOVL    CX,0x0(SP)
>         Readdir+0xa2 0x0000b64e MOVL    BP,0x4(SP)
>         Readdir+0xa6 0x0000b652 CALL    trimdirs(SB)
>         Readdir+0xab 0x0000b657 MOVL    f+0x0(FP),BX
>         Readdir+0xaf 0x0000b65b MOVL    AX,BP
>         Readdir+0xb1 0x0000b65d CMPL    AX,$0x0
>         Readdir+0xb4 0x0000b660 JEQ     Readdir+0x19(SB)
>         Readdir+0xba 0x0000b666 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0xbd 0x0000b669 SHLL    $0x2,CX
>         Readdir+0xc0 0x0000b66c MOVL    BP,dir+0x8(SB)(CX*1)
>         Readdir+0xc7 0x0000b673 LEAL    0x0(BX)(BX*2),AX
>         Readdir+0xca 0x0000b676 SHLL    $0x2,AX
>         Readdir+0xcd 0x0000b679 MOVL    $0x0,dir+0x4(SB)(AX*1)
>         Readdir+0xd8 0x0000b684 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0xdb 0x0000b687 SHLL    $0x2,CX
>         Readdir+0xde 0x0000b68a MOVL    dir+0x4(SB)(CX*1),AX
>         Readdir+0xe5 0x0000b691 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0xe8 0x0000b694 SHLL    $0x2,CX
>         Readdir+0xeb 0x0000b697 CMPL    dir+0x8(SB)(CX*1),AX
>         Readdir+0xf2 0x0000b69e JNE     Readdir+0xfa(SB)
>         Readdir+0xf4 0x0000b6a0 XORL    AX,AX
>         Readdir+0xf6 0x0000b6a2 ADDL    $0xc,SP
>         Readdir+0xf9 0x0000b6a5 RET
>         acid:
> 
> I am lost here.
> I read the acid manual, but I still don't know what this output is about.
> 
> -marco
> 

The error message lstk() emits is about an acid file which is supposed
to contain symbolic debugging information so values of local variable
may be displayed being missing:
>         acid: lstk()
>         <stdin>:2: (error) no stack frame: './acid' file does not exist

If I'm reading the following section of https://9p.io/sys/doc/comp.pdf right:
To make things simple, the default rules in the system mkfiles include
entries to make foo.acid from foo.c, so one may use mk to automate the
production of acid definitions for a given C source file.

You could descend into the directory that houses the source file that
fails to compile, e.g.:
../port/devcons.c

And see if there's a devcons.acid file there. It's supposed to be
generated by the following mkfile rule:
https://github.com/plan9foundation/plan9/blob/9db62717612a49f78a83b26ff5a176971c6cdd18/sys/src/9/port/portmkfile#L21C1-L22C48
%.acid: ../port/%.c
$CC $CFLAGS -a -I. ../port/$stem.c >$stem.acid

If there is, you could launch acid like you did above and run
include("sourcedirectory/devcons.acid");, so lstk() would print
something useful.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Ma094ad5b7e862a4405a9547f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-13  8:14                       ` Alexander Kapshuk
@ 2024-07-13 16:41                         ` Marco Feichtinger
  0 siblings, 0 replies; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-13 16:41 UTC (permalink / raw)
  To: 9fans

I did run mk over and over, but couldn't find any %.acid files when it crashed.

Interestingly, running 'mk nuke' resulted in an error for the first time:
        rc 2503: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
        mk: mkfile:121: syntax error; no var on left side of assignment/rule
        mk: rm -f *.[568ijqv] ...  : exit status=rc 1909: mk 2478: error

-marco



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M430090e088ac742a8f5db21e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-13  7:11                     ` Marco Feichtinger
  2024-07-13  8:14                       ` Alexander Kapshuk
@ 2024-07-14  1:06                       ` ori
  2024-07-14  2:40                         ` dlm-9fans
  2024-07-16 17:12                         ` Marco Feichtinger
  1 sibling, 2 replies; 24+ messages in thread
From: ori @ 2024-07-14  1:06 UTC (permalink / raw)
  To: 9fans

> 
> I am lost here. 
> I read the acid manual, but I still don't know what this output is about.
> 

lstk() prints a stack trace -- or at least tries to,
but fails. That implies to me that your stack frame
is busted.

asm()/casm() shows assembly. The PC you crashed on
is 0x0000b5d9, which happens to be in the middle of
this comparison instruction:

>         Readdir+0x2c 0x0000b5d8 CMPL    dir+0x8(SB)(CX*1),AX
>         Readdir+0x33 0x0000b5df JNE     Readdir+0xd8(SB)

which tells me whatever jumped into the code here
is junk; either a bad function pointer, a flipped
bit in your binary, or something else.

Since nothing in the asm you dumped jumps to the
address Readdir+0x2d(SB) (0x0000b5d9-0x0000b5ac),
that tells me that whatever is broken, it's likely
not in this function.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mb1b7f7abc2343184053ccf39
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-14  1:06                       ` ori
@ 2024-07-14  2:40                         ` dlm-9fans
  2024-07-16 17:12                         ` Marco Feichtinger
  1 sibling, 0 replies; 24+ messages in thread
From: dlm-9fans @ 2024-07-14  2:40 UTC (permalink / raw)
  To: 9fans

ori@eigenstate.org wrote:
ori: asm()/casm() shows assembly. The PC you crashed on
ori: is 0x0000b5d9, which happens to be in the middle of
ori: this comparison instruction:
ori: 
ori: >         Readdir+0x2c 0x0000b5d8 CMPL    dir+0x8(SB)(CX*1),AX
ori: >         Readdir+0x33 0x0000b5df JNE     Readdir+0xd8(SB)
ori: 
ori: which tells me whatever jumped into the code here
ori: is junk; either a bad function pointer, a flipped
ori: bit in your binary, or something else.

At this point, this is really sounding like a hardware issue.  I'm
betting it only happens after the build's been going for a while.  My
bet would be it's heat-related, and could be in the CPU or in memory,
leaning towards CPU.  Check your case and CPU fans, blow out dust,
make sure everything's firmly seated, etc.  If you built the machine
yourself, in particular installing the CPU, did you use thermal paste
between the CPU and the heatsink?  Reseat anything that's socketed,
including cables.  Also, make sure that there's a free air path to and
from all vents in the case.

Also, check the BIOS logs and such for temperature excursions,
assuming your BIOS reports such things.

Dworkin

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mc77820658e37f59385b949d6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] mk results in rc: suicide:
  2024-07-14  1:06                       ` ori
  2024-07-14  2:40                         ` dlm-9fans
@ 2024-07-16 17:12                         ` Marco Feichtinger
  1 sibling, 0 replies; 24+ messages in thread
From: Marco Feichtinger @ 2024-07-16 17:12 UTC (permalink / raw)
  To: 9fans

> Since nothing in the asm you dumped jumps to the
> address Readdir+0x2d(SB) (0x0000b5d9-0x0000b5ac),
> that tells me that whatever is broken, it's likely
> not in this function.

Aha, thanks for the explanation.

> At this point, this is really sounding like a hardware issue

I also start to believe that, but not due to overheating.
I did a proper installation of the components (e.g. thermal paste),
The temps are normal.

-marco

> On 14.07.2024, at 03:06, ori@eigenstate.org wrote:
> 
>> 
>> I am lost here. 
>> I read the acid manual, but I still don't know what this output is about.
>> 
> 
> lstk() prints a stack trace -- or at least tries to,
> but fails. That implies to me that your stack frame
> is busted.
> 
> asm()/casm() shows assembly. The PC you crashed on
> is 0x0000b5d9, which happens to be in the middle of
> this comparison instruction:
> 
>>        Readdir+0x2c 0x0000b5d8 CMPL    dir+0x8(SB)(CX*1),AX
>>        Readdir+0x33 0x0000b5df JNE     Readdir+0xd8(SB)
> 
> which tells me whatever jumped into the code here
> is junk; either a bad function pointer, a flipped
> bit in your binary, or something else.
> 
> Since nothing in the asm you dumped jumps to the
> address Readdir+0x2d(SB) (0x0000b5d9-0x0000b5ac),
> that tells me that whatever is broken, it's likely
> not in this function.
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M0b7f14e11ca4ef4c445e5ad3
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-07-16 17:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-04 13:43 [9fans] mk results in rc: suicide: Marco Feichtinger
2024-07-04 14:27 ` Alexander Kapshuk
2024-07-04 15:19   ` wb.kloke
2024-07-04 18:44     ` Marco Feichtinger
2024-07-04 19:54       ` Dave Eckhardt
2024-07-04 19:57         ` Charles Forsyth
2024-07-05  1:32           ` ibrahim via 9fans
2024-07-05  1:47           ` ibrahim via 9fans
2024-07-07 14:15             ` Marco Feichtinger
2024-07-07 14:23               ` ori
2024-07-07 15:36                 ` Marco Feichtinger
2024-07-09 16:19                   ` Ori Bernstein
2024-07-13  7:11                     ` Marco Feichtinger
2024-07-13  8:14                       ` Alexander Kapshuk
2024-07-13 16:41                         ` Marco Feichtinger
2024-07-14  1:06                       ` ori
2024-07-14  2:40                         ` dlm-9fans
2024-07-16 17:12                         ` Marco Feichtinger
2024-07-07 16:22               ` Dave Eckhardt
2024-07-07 17:24                 ` wb.kloke
2024-07-07 18:23                   ` Marco Feichtinger
2024-07-09  9:09                     ` wb.kloke
2024-07-09 11:30                       ` Charles Forsyth
2024-07-07 18:23                 ` Marco Feichtinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).