-- Ettore Aldrovandi ettore_at_sg1.hep.fsu.edu Ph: (850) 644 3289 http://www.hep.fsu.edu Fax: (850) 644 6735 From: "Alpert, Debra" <DAlpert_at_lifelinesys.com> To: "'rbabcock_at_heyoka.cc.whecn.edu'" <rbabcock_at_heyoka.cc.whecn.edu> Subject: RE: Need printing help - fast Date: Mon, 27 Nov 2000 13:46:56 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain Ron, We had this same problem with the lpr binary that shipped with TU5.1. By using truss to trace the system calls made by lpr, I found that the program parsed the printcap file, assuming that the "lp" field (default output device) was explicitly set in /etc/printcap for each printer. I had never set this, as we print to a network device. In any case, since the lpr code doesn't actually check the return value when it looks for the lp printcap entry, it proceeds happily along, although a NULL pointer has been returned. This caused problems down the line, as you can see from the following truss output: Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x0000000000000000 Err#139 Error 139 occurred. *** process killed *** The OS wasn't happy when access to memory address zero was attempted. It appears that the lpr code doesn't check the return value of the relevant call. In any case, I worked around this problem by adding a null lp entry to our printcap files (that is, ...stuff...:lp=:...stuff). Now the return value in question is a pointer to the above NULL string. This keeps lpr happy, and printing works once again. Hope this helps, --Deb Debra Alpert Senior Unix Systems Administrator Lifeline Systems > -----Original Message----- > From: rbabcock_at_heyoka.cc.whecn.edu [SMTP:rbabcock_at_heyoka.cc.whecn.edu] > Sent: Monday, November 27, 2000 12:14 PM > To: tru64-unix-managers_at_ornl.gov > Subject: Need printing help - fast > > Managers, > > Over the weekend I switched from an Alpha AS1000A 5/40 to an ES20D. > The old alpha was running 4.0f, the new one is running 5.1. I copied > the printcap file to the new system but am having a problem with the > networked printers. Below is a typical printcap entry: > > > lp20|20|LP20|:\ > :af=/usr/adm/lp20acct:\ > :lf=/usr/adm/lp20err:\ > :of=/usr/lbin/lpf -c:\ > :ct=tcp:\ > :pw#85:\ > :rm=aaa.bbb.ccc.ddd:\ > :rp=text:\ > :sd=/usr/spool/lpd20:\ > :sh: > > When a file is sent to this printer I get a segmentation fault and a > core dump. E. g., lpr -P20 /etc/motd results in a core dump. All of > my LAT printers are working ok. Any ideas? > > Ron Babcock, Dir. Admin. Computing > Casper College > Casper, WY 82601Received on Mon Nov 27 2000 - 21:00:27 NZDT
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT