Operating System - HP-UX
1822148 Members
3936 Online
109640 Solutions
New Discussion юеВ

Warning: Ridiculously long path truncated

 
SOLVED
Go to solution
Kong Kian Chay
Regular Advisor

Warning: Ridiculously long path truncated

System : HP-UX 10.20 (shell: /usr/bin/csh)

* When I login to "station1", I get above error messg.
* When I login to ALL other Workstations, NO PROBLEM.
* I "echo $path" & compared "station1" output with that of 3 other stations. NO DIFFERENCE.
* "wc -l" against output of "$path" says "1407". Same for the other 3 stations.

Questions :
* How can I resolve error on "station1" ?
Note that no problem on other stations.
* What is the MAX Length for "path" variable ?

23 REPLIES 23
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

Sorry, the last line should read :
"wc -c" results in 1407.
Animesh Chakraborty
Honored Contributor

Re: Warning: Ridiculously long path truncated

Hi,
What is your error mesg ?
Exactly what problem are you facing ?
I did a
# man path
No manual entry for path.
:(
I think there is no limit for the path length
but it will depend on the number of character you can type in in one continuous single line while setting path on shell prompt.

Good luck
Animesh
Did you take a backup?
Santosh Nair_1
Honored Contributor

Re: Warning: Ridiculously long path truncated

Remove the DOT that is "." from any and all path settings in your .cshrc. Make sure you don't set "." anywhere except at the VERY END of the file. This ensures that "." which means "current directory" only gets set once, and that it is always at the very end of the path. In Unix the "." (current dir) should be the LAST thing in your path. Since the path gets modified several times as your environment is set up, putting this line at the very end of your .cshrc and assuring it is only set once prevents problems associated with using the correct binaries, security issues, and the "ridiculously long path" error.

-Santosh
Life is what's happening while you're busy making other plans
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

Santosh

I have checked. There is no "." settings in my path.

NOTE : "wc -c" against $path shows exactly same figure for "station1" & 3 other stations.
But only "station1" gets the error messg.
Volker Borowski
Honored Contributor

Re: Warning: Ridiculously long path truncated

Hmm,

this appears to be an error within the login profiles. The profiles seem to execute may be additional scripts, that set path to other values. Since this fails, the path is not set as "wanted" and remains as you see it at the end, so you see no diffrence, because it is not changed.

May be you need to track down where it occurs.
Put some echo statements into /etc/login, $HOME/.login, $HOME/.cshrc at various places to see how the path changes throughout the login process.

Best guess: You merged some lines in one of these scripts, so the intended statement was destroyed.

Good hunting
Volker
Santosh Nair_1
Honored Contributor

Re: Warning: Ridiculously long path truncated

Do you have multiple identical entries in your path, e.g. /usr/local/bin is there several times, etc. If thats the case, try cutting it down by editing the .chsrc. It sounds like the path has gotten too long and is getting truncated on the second system.

Also just because wc -l matches up, doesn't mean much...do the actual entried in the path for both machine also match up?

-Santosh
Life is what's happening while you're busy making other plans
Robin Wakefield
Honored Contributor

Re: Warning: Ridiculously long path truncated

Hi,

How is your PATH being set in your .cshrc? It sounds like it's getting re-extended, so you may need to put a check in, e.g.

if ($?PATHDONE == 0) set path = ($path ~/bin)
setenv PATHDONE

If it's only happening on one server, have you a separate id for this machine, or is it sourcing something locally?

Rgds, Robin.
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

* the problem on "station1" occurs for ALL userids. However, for ALL userids, it does NOT occur on other Workstations.
* I "echo $path > path.tmp" for "station1" and 3 other stations. Then, did a "diff" for them. NO DIFFERENCE. "wc -c" also showed NO difference.

NOTE : If I were to add more paths to my $HOME/.login, the path will be truncated on "station1", but NOT on other stations.
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

* Have also checked the final $path, NO REPEATED entries.
Robin Wakefield
Honored Contributor

Re: Warning: Ridiculously long path truncated

Hi,

Perhaps it is temporarily "too long" and is then being reset by your ~.cshrc or ~/.login

Does your /etc/csh.login show a difference from other servers? This is the system wide login script for csh.

Can you put an echo statement at the beginning and end of your .cshrc and .login to see at what point the error message is being output.

Rgds, Robin
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

To ALL :

* I attached the EXACT $HOME/.login I used.
* The error messg appears only AFTER Line-22.

In summary, I have already verified & ensured the following :

* Problem exists only on "station1".
* No "." (current dir) in my path settings.
* No repeated entries in my path settings.
* Copied "/etc/csh.login" to all other Workstations.
* All Users' $HOME/.login & $HOME/.cshrc & $HOME/.dtprofile
are EXACT Copy of each other.

* The problem occurs for ALL Users on "station1".
But does NOT occur on all other Workstations.

NOTE :
* "All other Workstations" refer to 3 other stations used for testing.
* "All Users" refer to 3 UserIDs that I used for testing.
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

To ALL :

* I attached the EXACT $HOME/.login I used.
* The error messg appears only AFTER Line-22.

In summary, I have already verified & ensured the following :

* Problem exists only on "station1".
* No "." (current dir) in my path settings.
* No repeated entries in my path settings.
* Copied "/etc/csh.login" to all other Workstations.
* All Users' $HOME/.login & $HOME/.cshrc & $HOME/.dtprofile
are EXACT Copy of each other.

* The problem occurs for ALL Users on "station1".
But does NOT occur on all other Workstations.

NOTE :
* "All other Workstations" refer to 3 other stations used for testing.
* "All Users" refer to 3 UserIDs that I used for testing.
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

Would like to add that :

* For the attached $HOME/.login, although the warning messg appears, the path is NOT truncated at all in "station1".

* If I am to ADD more paths to the attached $HOME/.login, the Final path will be truncated on "station1", but is O.K. on all other Workstations.

* I have verified that on all other Workstations, I can ADD in 2-times more additional paths without problems.

* I have also verified that the physical path for Line-22 EXISTS !

Santosh Nair_1
Honored Contributor

Re: Warning: Ridiculously long path truncated

The only other thing I can think of is checking /etc/PATH on the machines and making sure that's the same across all the machines. /etc/PATH gets sourced in from /etc/csh.login.

-Santosh
Life is what's happening while you're busy making other plans
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

I think there is some problem with my previous attached file. I hereby attached my $HOME/.login again.
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

Santosh

* I have "echo $path" before $HOME/.login gets executed.
* It is EXACTLY the same for ALL stations including "station1".
Volker Borowski
Honored Contributor

Re: Warning: Ridiculously long path truncated

Seeing this, it comes to my mind, that there might be some truth in this error-message ;-)

OK, just kidding.....

I am not sure, but this seems to be a problem with memory. Do you have the same OS-Release / csh-patchlevel on all machines. I do not know if there is a specific kernelparameter restricting the size of environment variables, but I would compare /stand/system on two boxes to see if there are major diffrences.

Not real help at all.
Volker
Robin Wakefield
Honored Contributor

Re: Warning: Ridiculously long path truncated

Hi,

The limit is being reached on the environment variable "$PATH", not the shell variable "$path". This is defined in /usr/include/limits.h (default 1023). Check this file on all your machines.

echo $PATH | wc -c =1023
echo $path | wc -c =1407

Are all your machines running the same os/patch levels?

Rgds, Robin
Rgds, Robin.
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

* I have done a "diff" for all the workstations' /usr/include/limits.h
==> Result: NO DIFFERENCE
* /usr/include/limits.h current settings :
_POSIX_PATH_MAX 255
PATH_MAX 1023

* I have increased "PATH_MAX" to 2000 on "station1" ==> result: SAME ERROR

* The patch level on "station1" is different from the other Workstations. This is due to Hard-Disk Space Constraints. More programs are installed on "station1".

* The O.S on "station1" is SAME as the rest. HP-UX 10.2

* NOTE : The login scrits "/etc/csh.login" & "/etc/PATH" & $HOME/.login & $HOME/.cshrc & $HOME/.dtprofile are EXACTLY the SAME for all Uesrs & ALL Workstations in our setup.

Sanjay_6
Honored Contributor

Re: Warning: Ridiculously long path truncated

Hi,

Have you checked these files too,
/etc/login
/etc/profile
/etc/cshrc

Good luck,

thanks
Sanjay_6
Honored Contributor
Solution

Re: Warning: Ridiculously long path truncated

Hi Kong,

Do you have patch PHCO_19434 on the system. If you don't have a look at this thread. Might solve your problem. This is the csh patch for UX 10.20.

http://us-support2.external.hp.com/wpsl/bin/doc.pl/screen=wpslDisplayPatch/sid=7e93965016280b073e?PATCH_PATH=/hp-ux_patches/s700_800/10.X/PHCO_19434&HW=s800&OS=10.20

Hope this helps.

thanks
Kong Kian Chay
Regular Advisor

Re: Warning: Ridiculously long path truncated

Patch PHCO_19434 SOLVED THE PROBLEM !!!

Thanks, SANJAY.

* Now my $HOME/.login contains the paths of additional 15 softwares & NO PROBLEM !!
Michael D'Aulerio
Regular Advisor

Re: Warning: Ridiculously long path truncated

I found this script on the ITRC in one of the forum discussions. It removes duplicate entries from the PATH. I didn't write it and apologize to whoever did. It comes in handy. In ksh its:

PATH=$(echo $PATH | scrub_path.sh)

For csh its:

set path = ` echo $PATH | scrub_path.sh | sed 's/:/ /g' `


Mike D'.
Email: michael.n.daulerio@lmco.com