Trying to debug truss command of PID in Solaris 10.


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Trying to debug truss command of PID in Solaris 10.
# 1  
Old 03-13-2019
Trying to debug truss command of PID in Solaris 10.

I'm getting the following output from a truss operation of a PID from an application that will not start properly, something with the writing to an archive. Here is the output:


Code:
open("arch/chkpt.arch", O_RDWR)                 Err#13 EACCES
open("arch/chkpt.arch", O_RDWR|O_CREAT|O_TRUNC, 0666) Err#13 EACCES
rename("", "./error/")                          Err#2 ENOENT
open("/usr/local/gentran61/prod/./temp//arch.l", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
llseek(4, 0, SEEK_END)                          = 0x137016BB
time()                                          = 1552504635
fstat64(4, 0xFFBFD738)                          = 0
fstat64(4, 0xFFBFD5E0)                          = 0
ioctl(4, TCGETA, 0xFFBFD6C4)                    Err#25 ENOTTY
write(4, " a r c h : 3 1 5 4 : 0 3".., 85)      = 85
close(4)                                        = 0
unlink("")                                      Err#2 ENOENT
unlink("arch/chkpt.arch")                       Err#13 EACCES
open("arch/chkpt.arch", O_RDWR)                 Err#13 EACCES
open("arch/chkpt.arch", O_RDWR|O_CREAT|O_TRUNC, 0666) Err#13 EACCES
rename("", "./error/")                          Err#2 ENOENT
open("/usr/local/gentran61/prod/./temp//arch.l", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
llseek(4, 0, SEEK_END)                          = 0x13701710
time()                                          = 1552504635
fstat64(4, 0xFFBFD738)                          = 0
fstat64(4, 0xFFBFD5E0)                          = 0
ioctl(4, TCGETA, 0xFFBFD6C4)                    Err#25 ENOTTY
write(4, " a r c h : 3 1 5 4 : 0 3".., 85)      = 85
close(4)                                        = 0
unlink("")                                      Err#2 ENOENT
unlink("arch/chkpt.arch")                       Err#13 EACCES
open("arch/chkpt.arch", O_RDWR)                 Err#13 EACCES
open("arch/chkpt.arch", O_RDWR|O_CREAT|O_TRUNC, 0666) Err#13 EACCES
rename("", "./error/")                          Err#2 ENOENT
open("/usr/local/gentran61/prod/./temp//arch.l", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
llseek(4, 0, SEEK_END)                          = 0x13701765
time()                                          = 1552504635
fstat64(4, 0xFFBFD738)                          = 0
fstat64(4, 0xFFBFD5E0)                          = 0
ioctl(4, TCGETA, 0xFFBFD6C4)                    Err#25 ENOTTY
 write(4, " a r c h : 3 1 5 4 : 0 3".., 85)      = 85



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 03-13-2019 at 06:48 PM.. Reason: Added CODE tags.
# 2  
Old 03-13-2019
It can't open, create, or delete arch/chkpt.arch. Can you ls -l that file and ls -ld its folder and post the permissions please?
# 3  
Old 03-13-2019
I can manually create the file with the same username/UID with no errors. permissions are wide open at 777 on the arch folder as well.


ls -l | grep arch
drwxrwxrwx 3 ediprod edi 1945600 Mar 13 19:49 arch


That file does not exist but I believe it's created as a checkpoint for the application to rename archive files. All the files in the folder are 777 as well just to rule out permissions. I went from an NFS share on an IBM v7000 to just a straight up Ubuntu 16 Linux server running NFS. All the mount/export options are the same from both storage devices.
# 4  
Old 03-13-2019
So the file is on an NFS mount. Correct?
How is the failing process run (executed).... using batch or crontab?
Can you run the problem job successfully when logged in interactively as that user and at the command line?? ... I think that is what you were trying to say. Correct me, please.
# 5  
Old 03-13-2019
Unfortunately I inherited an old version of Gentran EDI software that runs it's application on an NFS share. It was on an IBM v7000 and we migrated to a regular Ubuntu Linux server running NFS server and I've migrated several successful shares with no issues. However on this particular share with the application it will not start that application as version 3 NFS on Solaris client. If I go to version 4 it will start the application but in degraded mode and having all kinds of ACL issues.



Process is started manually but within the NFS share just running an application command that's compiled for Solaris. You start it running a shell program and it calls this executable. I traced it down to the archive portion I started this thread with. I can write to that folder and everything but I keep getting this error in the truss output.
# 6  
Old 03-13-2019
Can you unmount the NFS mountpoint (I guess it is /arch) on the solaris box? At that point what does ubuntu think? You do have an NFS problem. I have had this issue as well. It was caused in NFS shutdown by moving directories without knowing what zone had an open NFS file, as in cwd for example. The global zone kept track of NFS mounts. Get the inode from inside the zone and in the global zone. If they do not match you have this problem. ls -di /path/to/dirname will give you inode for given directory

As an aside - a workaround: why can you not simply move the entire /arch directory tree to Solaris, set up NFS to serve the disk from Solaris to elsewhere if required.
# 7  
Old 03-14-2019
You say you manually can create files. Did you do this on the Solaris box??
arch/chkpt.arch is relative to the current work directory. Please peek the process with
Code:
pwdx <PID of the running process>

and verify.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get the parent PID only in Solaris?

Hi, I am using this command fuser_result=`fuser -f /web/$1/admin-*/logs/access` to get the parent pid of the process. However, The output differs and at times it shows two pids instead of one thus failing the logic of my script. See output below: bash-3.2$ fuser -f... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. UNIX for Advanced & Expert Users

unable to understand the output of TRUSS command

Hi, I am trying to set ulimit for soft stack unlimited, but this is not taking effect, after tracing the ulimit -a unlimited command, the below output was generated, which i am unable to comprehend. Could any one help me with this? prcbap1-r10prod: truss -d ulimit -s unlimited Tue Dec 30... (2 Replies)
Discussion started by: NasirAbbasi
2 Replies

3. Solaris

Is there a way to debug the startup on Solaris?

Is there a way to debug the startup on a VT100 running Solaris 5? I have a problem related to file attributes that are resetting to there prior settings when the machine reboots. (3 Replies)
Discussion started by: jimcz2it
3 Replies

4. Shell Programming and Scripting

Get Pid from a command output

pariosd -status NodeName ID ROLE STATE PROTECTION --------------------------------------------------------------------------- tn320_scm10 10 ACTIVE UP No Protection tn320_scm11 11 UNKNOWN UNKNOWN LocalApps ... (5 Replies)
Discussion started by: hariprasad123
5 Replies

5. Programming

gdb: how to debug an executable file with a few command line papameters

If an executalbe file has several parameters, gdb can not pass parameters correctly. Let us see: run: ./executablefile1 agr1 arg2 arg3 debug: gdb executablefile1 run executalbefile1 arg1 arg2 arg3 then argv : executablefile1 argv : executablefile argv : arg1 ... (3 Replies)
Discussion started by: cdbug
3 Replies

6. Shell Programming and Scripting

what's the debug command for perl scripts

Hi, Can you please let me know if there's any debug command for perl scripts like set -x for shell scripts (2 Replies)
Discussion started by: dayanandra
2 Replies

7. UNIX for Dummies Questions & Answers

Truss and the FTP command

I have been trying to perform the following command without success truss -feo truss.out ftp -nvd < ftpcmds.txt The error I am getting is "truss: cannot trace set_id or unreadable object file /usr/bin/ftp" I have tested the file that contains the ftp commands and it works fine with ftp... (5 Replies)
Discussion started by: canman
5 Replies

8. UNIX for Dummies Questions & Answers

Kill a debug command

once I run the debug command for a program, I can't get back to the prompt afterwards. I'm sure there is some escape sequence that will get me back there, but I don't know what it is. Anyone know?--thanks--AJ (3 Replies)
Discussion started by: AJA
3 Replies
Login or Register to Ask a Question