Operating System - HP-UX
1833760 Members
2514 Online
110063 Solutions
New Discussion

adb hangs on rp3440 with 4 processors but OK with 2 processors

 
SOLVED
Go to solution
Mike Cresswell
Occasional Advisor

adb hangs on rp3440 with 4 processors but OK with 2 processors

Hi All

I've found that the following command hangs on an rp3440 with 4 processors

echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem

This works fine on all other HP-UX processors that I've tried it on and it also works fine on an rp3440 with 2 processors.

The problem appears to be that adb doesn't start correctly. If you try to run adb with

# adb -k /stand/vmunix /dev/mem

you don't get the adb> prompt.

The solution seems to be to use /dev/kmem instead of /dev/mem. This seems to work OK on other processors as well.

So I seem to have a workaround but wondered if anyone can tell me:

Is this a known bug?

Can anyone see a problem with using /dev/kmem instead of /dev/mem? (To be honest, I'm not sure what the difference is).

Cheers

Mike Cresswell




5 REPLIES 5
BUPA IS
Respected Contributor

Re: adb hangs on rp3440 with 4 processors but OK with 2 processors

Hello Mike ,

You do not say which release you are on.
You may have a bug which is causing it to hang rather than complain that it can't read things.
/dev/mem is a map to physical memory
/dev/kmem is a map to virtual memory

see man pages for mem(7) and kmem(7)


on 11.23 june 2007 patches 7420 4 way i get

#/root echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem
adb: info: Option -k is deprecated.
adb: warning: Trouble reading version string from memory file ...
adb: warning: Object file and memory file may not be matched.
adb: error: /dev/mem: Device busy.
adb: warning: Could not complete object file specific initializtions ...
adb: warning: Proceeding anyway; But some commands may fail.
itick_per_usec:
itick_per_usec:
adb: error: /dev/mem: Device busy.

#/root echo itick_per_usec/D | adb -k /stand/vmunix /dev/kmem
adb: info: Option -k is deprecated.
itick_per_usec:
itick_per_usec: 900


on 11.11 june 2007 7420 (same box 2 way) I get

#/root echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem
itick_per_usec:
itick_per_usec: 900
#/root echo itick_per_usec/D | adb -k /stand/vmunix /dev/kmem
itick_per_usec:
itick_per_usec: 900

like wise on my 2 way 3440 with 11.11 also june 2007

the -k is surplus to requirements on these releases

root echo itick_per_usec/D | adb /stand/vmunix /dev/kmem
itick_per_usec:
itick_per_usec: 1000

I hope this is of some help
Mike
Help is out there always!!!!!
Mike Cresswell
Occasional Advisor

Re: adb hangs on rp3440 with 4 processors but OK with 2 processors

Hi Mike

Thanks! That does help with part of the problem.

Thanks also for the explanation of mem versus kmem. I should have done "man mem" and not "man /dev/mem". duhhh... :-)

The box is an rp3440 with 4 processors at HP-UX 11.11.

I think the two processor rp3440 which works OK is also at HP-UX 11.11 but I'd need to double check that. A colleague checked that box for me. It's also possible that they have different patches.

Your message is also interesting because you get "info" messages from adb whereas I see nothing.

By the way, I have also tried executing

# adb -k /stand/vmunix /dev/mem

and

# adb /stand/vmunix /dev/mem

Both give only the following

# adb -k /stand/vmunix /dev/mem
PA-64 adb ($h help $q quit)

Nothing more. Whereas on a working box I then get the adb> prompt.

The man page on my box doesn't say anything about -k being deprecated. May mean something, may mean nothing.

I guess it could be that there is a patch needed which isn't installed but can't find any reference to this as a known problem.

Thanks Again and Best Regards

Mike
BUPA IS
Respected Contributor
Solution

Re: adb hangs on rp3440 with 4 processors but OK with 2 processors

Hello Mike,
I can't break mine anywhere , the message only comes from my 11.23 system. The others are all on 11.11 patched to June 2007 , the -k option is only deprecated in 11.23 but at my patch level leaving it out does not affect this particular command .

If you can, put on the June 2007 quality packs and see how it goes. The error may be in the memory routines rather than in adb a quick search of the patch database for /dev/mem on 11.11 indicates that all the memory headers have patches due to a debug mode problem . my what /usr/bin/adb
/usr/bin/adb:
$Revision: B.11.11_LR
Fri Oct 27 01:03:42 PDT 2000 $
which I think is base 11.11

regards
Mike
Help is out there always!!!!!
Mike Cresswell
Occasional Advisor

Re: adb hangs on rp3440 with 4 processors but OK with 2 processors

Hi Mike

Thanks once again. I suspect you're correct and the 2007 quality pack might resolve this.

As we can't guarantee what version our customers have installed, I think we'll stick with the "workaround" of using /dev/kmem.

Thanks for all your help and I'm going to close this one off.

Cheers

Mike Cresswell
Mike Cresswell
Occasional Advisor

Re: adb hangs on rp3440 with 4 processors but OK with 2 processors

As per the notes and replies, it's probable that the latest patches would resolve this. As an alternative the workaround of using /dev/kmem instead of /dev/mem seems to work fine