Help :How can I use wd utility?

Hi, morning everyone,

I know QNX utility “dumper” can dumper a process, and then build a file just
as “process_name.dmp”.

But I did not know how to parse the .dmp file. Someone said that the utility
“wd” in QNX425 will do this, but I really didn’t know how to parse it.

Please tell me the detail of how to use dumper and wd, and thanks a lot.

Maa
2004-09-18

“Maa” <maa_vip@sina.com> wrote in message news:cifbdj$mec$1@inn.qnx.com

Hi, morning everyone,

I know QNX utility “dumper” can dumper a process, and then build a file
just
as “process_name.dmp”.

But I did not know how to parse the .dmp file. Someone said that the
utility
“wd” in QNX425 will do this, but I really didn’t know how to parse it.

Look at the online help for instruction how to use the Watcom Debugger.

Basicaly you would do “wd -trap=pdm process_name.dmp” (could be pmd instead
of pdm)

Please tell me the detail of how to use dumper and wd, and thanks a lot.

Maa
2004-09-18

Mario, when I dump a process, I’ll press dumper -d /home/dump/ -p pid &

then change to the directory and press
wd -tr=pmd proesee_name.dmp

But the tool tell me the file format error.

Of cause thank you very much.

Maa
2004-09-18

“Mario Charest” <nowheretobefound@8thdimension.com> дÈëÏûÏ¢
news:cife8p$oi9$1@inn.qnx.com

“Maa” <> maa_vip@sina.com> > wrote in message news:cifbdj$mec$> 1@inn.qnx.com> …
Hi, morning everyone,

I know QNX utility “dumper” can dumper a process, and then build a file
just
as “process_name.dmp”.

But I did not know how to parse the .dmp file. Someone said that the
utility
“wd” in QNX425 will do this, but I really didn’t know how to parse it.

Look at the online help for instruction how to use the Watcom Debugger.

Basicaly you would do “wd -trap=pdm process_name.dmp” (could be pmd
instead
of pdm)


Please tell me the detail of how to use dumper and wd, and thanks a lot.

Maa
2004-09-18
\

“Maa” <maa_vip@sina.com> wrote in message news:cig85e$cn1$1@inn.qnx.com

Mario, when I dump a process, I’ll press dumper -d /home/dump/ -p pid &

then change to the directory and press
wd -tr=pmd proesee_name.dmp

But the tool tell me the file format error.

Never seen that happens. Don’t have a clue what could be the cause of the
problem. Hopefuly someone else will comment.

Of cause thank you very much.

Maa
2004-09-18

“Mario Charest” <> nowheretobefound@8thdimension.com> > дÈëÏûÏ¢
news:cife8p$oi9$> 1@inn.qnx.com> …

“Maa” <> maa_vip@sina.com> > wrote in message
news:cifbdj$mec$> 1@inn.qnx.com> …
Hi, morning everyone,

I know QNX utility “dumper” can dumper a process, and then build a file
just
as “process_name.dmp”.

But I did not know how to parse the .dmp file. Someone said that the
utility
“wd” in QNX425 will do this, but I really didn’t know how to parse it.

Look at the online help for instruction how to use the Watcom Debugger.

Basicaly you would do “wd -trap=pdm process_name.dmp” (could be pmd
instead
of pdm)


Please tell me the detail of how to use dumper and wd, and thanks a
lot.

Maa
2004-09-18


\

Mario Charest <nowheretobefound@8thdimension.com> wrote:

MC > “Maa” <maa_vip@sina.com> wrote in message news:cig85e$cn1$1@inn.qnx.com

Mario, when I dump a process, I’ll press dumper -d /home/dump/ -p pid &

then change to the directory and press
wd -tr=pmd proesee_name.dmp

But the tool tell me the file format error.

MC > Never seen that happens. Don’t have a clue what could be the cause of the
MC > problem. Hopefuly someone else will comment.

This sounds like an old versionitus problem I remember

The version of dumper is not compatable with the version of wd.

Can you post the file dates and sizes of both dumper and wd and hopfully
someone can send you the newer version of whichever?

Bill Caroselli <qtps@earthlink.net> wrote:

Mario Charest <> nowheretobefound@8thdimension.com> > wrote:

MC > “Maa” <> maa_vip@sina.com> > wrote in message news:cig85e$cn1$> 1@inn.qnx.com> …
Mario, when I dump a process, I’ll press dumper -d /home/dump/ -p pid &

then change to the directory and press
wd -tr=pmd proesee_name.dmp

But the tool tell me the file format error.

MC > Never seen that happens. Don’t have a clue what could be the cause of the
MC > problem. Hopefuly someone else will comment.

This sounds like an old versionitus problem I remember

The version of dumper is not compatable with the version of wd.

Can you post the file dates and sizes of both dumper and wd and hopfully
someone can send you the newer version of whichever?

Actually, might not be versionitis, entirely. Early in the life
of dumper, it dumped out ALL the address space of the process, whether
there was actual RAM there or not. Later in the life of dumper, it
started creating “sparse” dump files, or at least had that capability.

“wd -tr=pmd” will load the non-sparse dump files.
“wd -tr=sparse” will load the sparse dump files.

So, it might be be a sparse/not-sparse issue.

-David

Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com

There are some interesting things in my test.

First, I dumper a generic process such as Net or inetd, everything is okay,
and I can parse the *.dmp file by wd utility. But when I dumper my process,
the operation system freeze suddenly just like the status what I said
before.

1, I run my process, and it’s okay;
2, I dumper it, and it’s okay too;
dumper -d /home/dump/ -p pid &
3, Then I kill the process, but when I press the enter key, the OS freeze,
and the order is:
slay -s sigsegv processname or
kill -sigsegv pid

And why? And this is the irqs in my system:

sin irq

IRQ PID PROGRAM CS: IP DS
-1 16 file://1/bin/Dev32 0005:005760 000D
-1 19 file://1/bin/Dev32.ansi 0005:005DC0 000D
-1 21 file://1/bin/Dev32.ser 0005:0024FC 000D
-1 24 file://1/bin/Fsys.floppy 0005:0026FC 000D
-1 56 file://1/bin/Net 0015:0041F1 001D
-1 73 file://1/bin/Net.fd 0005:0034D0 000D
0 1 sys/Proc32 00F0:005000 00F8
0 56 file://1/bin/Net 0015:0042EA 001D
0 61 file://1//App/our_process 0005:036E9A 000D
1 19 file://1/bin/Dev32.ansi 0005:00690C 000D
3 21 file://1/bin/Dev32.ser 0005:00177C 000D
4 21 file://1/bin/Dev32.ser 0005:0017A4 000D
6 24 file://1/bin/Fsys.floppy 0005:0026E5 000D
10 56 file://1/bin/Net 0015:003FEB 001D
11 61 file://1/
/App/our_process 0005:03757C 000D
13 1 sys/Proc32 00F0:004FC0 00F8
14 5 /bin/Fsys.eide 0005:00A6F4 000D

Maa
2004-09-23

Just at though; does your process thread or tfork()?

“Maa” <maa_vip@sina.com> wrote in message news:ciu5uc$2ks$1@inn.qnx.com

There are some interesting things in my test.

First, I dumper a generic process such as Net or inetd, everything is
okay,
and I can parse the *.dmp file by wd utility. But when I dumper my
process,
the operation system freeze suddenly just like the status what I said
before.

1, I run my process, and it’s okay;
2, I dumper it, and it’s okay too;
dumper -d /home/dump/ -p pid &
3, Then I kill the process, but when I press the enter key, the OS freeze,
and the order is:
slay -s sigsegv processname or
kill -sigsegv pid

And why? And this is the irqs in my system:

sin irq

IRQ PID PROGRAM CS: IP DS
-1 16 file://1/bin/Dev32 0005:005760 000D
-1 19 file://1/bin/Dev32.ansi 0005:005DC0 000D
-1 21 file://1/bin/Dev32.ser 0005:0024FC 000D
-1 24 file://1/bin/Fsys.floppy 0005:0026FC 000D
-1 56 file://1/bin/Net 0015:0041F1 001D
-1 73 file://1/bin/Net.fd 0005:0034D0 000D
0 1 sys/Proc32 00F0:005000 00F8
0 56 file://1/bin/Net 0015:0042EA 001D
0 61 file://1//App/our_process 0005:036E9A 000D
1 19 file://1/bin/Dev32.ansi 0005:00690C 000D
3 21 file://1/bin/Dev32.ser 0005:00177C 000D
4 21 file://1/bin/Dev32.ser 0005:0017A4 000D
6 24 file://1/bin/Fsys.floppy 0005:0026E5 000D
10 56 file://1/bin/Net 0015:003FEB 001D
11 61 file://1/
/App/our_process 0005:03757C 000D
13 1 sys/Proc32 00F0:004FC0 00F8
14 5 /bin/Fsys.eide 0005:00A6F4 000D

Maa
2004-09-23
\

Yes, there is one main process and it has 5 threads which created by
tfork().

I see, someone says that it is dangerous that use thread and tfork() in qnx4
OS, but I really don’t know what’s the danger and how to avoid it?

Is there any other good idea if do not use thread and tfork()? And what’s
your advice?

Maa
2004-09-24

“Mario Charest” <nowheretobefound@8thdimension.com> wrote in message
news:civp78$9br$1@inn.qnx.com

Just at though; does your process thread or tfork()?

“Maa” <> maa_vip@sina.com> > wrote in message news:ciu5uc$2ks$> 1@inn.qnx.com> …
There are some interesting things in my test.

First, I dumper a generic process such as Net or inetd, everything is
okay,
and I can parse the *.dmp file by wd utility. But when I dumper my
process,
the operation system freeze suddenly just like the status what I said
before.

1, I run my process, and it’s okay;
2, I dumper it, and it’s okay too;
dumper -d /home/dump/ -p pid &
3, Then I kill the process, but when I press the enter key, the OS
freeze,
and the order is:
slay -s sigsegv processname or
kill -sigsegv pid

And why? And this is the irqs in my system:

sin irq

IRQ PID PROGRAM CS: IP DS
-1 16 file://1/bin/Dev32 0005:005760 000D
-1 19 file://1/bin/Dev32.ansi 0005:005DC0 000D
-1 21 file://1/bin/Dev32.ser 0005:0024FC 000D
-1 24 file://1/bin/Fsys.floppy 0005:0026FC 000D
-1 56 file://1/bin/Net 0015:0041F1 001D
-1 73 file://1/bin/Net.fd 0005:0034D0 000D
0 1 sys/Proc32 00F0:005000 00F8
0 56 file://1/bin/Net 0015:0042EA 001D
0 61 file://1//App/our_process 0005:036E9A 000D
1 19 file://1/bin/Dev32.ansi 0005:00690C 000D
3 21 file://1/bin/Dev32.ser 0005:00177C 000D
4 21 file://1/bin/Dev32.ser 0005:0017A4 000D
6 24 file://1/bin/Fsys.floppy 0005:0026E5 000D
10 56 file://1/bin/Net 0015:003FEB 001D
11 61 file://1/
/App/our_process 0005:03757C 000D
13 1 sys/Proc32 00F0:004FC0 00F8
14 5 /bin/Fsys.eide 0005:00A6F4 000D

Maa
2004-09-23


\

“Maa” <maa_vip@sina.com> wrote in message news:civt4g$bnm$1@inn.qnx.com

Yes, there is one main process and it has 5 threads which created by
tfork().

I see, someone says that it is dangerous that use thread and tfork() in
qnx4
OS, but I really don’t know what’s the danger and how to avoid it?

Well now you know of one reason, dumper/wd is “incompatible” with threads…

Threads is somewhat of a kludge in QNX4, some C functions are not thread
safe, file handle are not thread safe. Photon lib isn’t thread safe, TCP/IP
isn’t thread safe.

Is there any other good idea if do not use thread and tfork()? And what’s
your advice?

Use separate processes and exchange data via messaging or share memory.

Maa
2004-09-24

“Mario Charest” <> nowheretobefound@8thdimension.com> > wrote in message
news:civp78$9br$> 1@inn.qnx.com> …

Just at though; does your process thread or tfork()?

“Maa” <> maa_vip@sina.com> > wrote in message
news:ciu5uc$2ks$> 1@inn.qnx.com> …
There are some interesting things in my test.

First, I dumper a generic process such as Net or inetd, everything is
okay,
and I can parse the *.dmp file by wd utility. But when I dumper my
process,
the operation system freeze suddenly just like the status what I said
before.

1, I run my process, and it’s okay;
2, I dumper it, and it’s okay too;
dumper -d /home/dump/ -p pid &
3, Then I kill the process, but when I press the enter key, the OS
freeze,
and the order is:
slay -s sigsegv processname or
kill -sigsegv pid

And why? And this is the irqs in my system:

sin irq

IRQ PID PROGRAM CS: IP DS
-1 16 file://1/bin/Dev32 0005:005760 000D
-1 19 file://1/bin/Dev32.ansi 0005:005DC0 000D
-1 21 file://1/bin/Dev32.ser 0005:0024FC 000D
-1 24 file://1/bin/Fsys.floppy 0005:0026FC 000D
-1 56 file://1/bin/Net 0015:0041F1 001D
-1 73 file://1/bin/Net.fd 0005:0034D0 000D
0 1 sys/Proc32 00F0:005000 00F8
0 56 file://1/bin/Net 0015:0042EA 001D
0 61 file://1//App/our_process 0005:036E9A 000D
1 19 file://1/bin/Dev32.ansi 0005:00690C 000D
3 21 file://1/bin/Dev32.ser 0005:00177C 000D
4 21 file://1/bin/Dev32.ser 0005:0017A4 000D
6 24 file://1/bin/Fsys.floppy 0005:0026E5 000D
10 56 file://1/bin/Net 0015:003FEB 001D
11 61 file://1/
/App/our_process 0005:03757C 000D
13 1 sys/Proc32 00F0:004FC0 00F8
14 5 /bin/Fsys.eide 0005:00A6F4 000D

Maa
2004-09-23




\

Mario Charest <nowheretobefound@8thdimension.com> wrote:

MC > “Maa” <maa_vip@sina.com> wrote in message news:civt4g$bnm$1@inn.qnx.com

Yes, there is one main process and it has 5 threads which created by
tfork().

I see, someone says that it is dangerous that use thread and tfork() in
qnx4
OS, but I really don’t know what’s the danger and how to avoid it?

MC > Well now you know of one reason, dumper/wd is “incompatible” with threads…

MC > Threads is somewhat of a kludge in QNX4, some C functions are not thread
MC > safe, file handle are not thread safe. Photon lib isn’t thread safe, TCP/IP
MC > isn’t thread safe.

Is there any other good idea if do not use thread and tfork()? And what’s
your advice?

MC > Use separate processes and exchange data via messaging or share memory.

Maa
2004-09-24

What bugged me was that errno wasn’t thread safe. The obvious choice for
threads is a communications thread and a worker thread. But my
communications thread was constantly being fooled by errnos that were set
in the main thread. You could never test WHY something failed.