Perl Script execution causes system panic

Hi All,
I'm using a Perl script of my own for work purpose.The script was running fine yesterday,until today morning I have updated the XCode to 4.6.2.
Everytime I execute the script,my computer turns off and resatarts with system panic.
Here are the error report content.
Interval Since Last Panic Report:  974 sec
Panics Since Last Report:          3
Anonymous UUID:                    AE85B099-0AAA-B563-0607-3EFA733CAEDF
Thu Apr 18 15:08:18 2013
panic(cpu 0 caller 0xffffff8018d1edba): "negative open count (c, 16, 2)"@/SourceCache/xnu/xnu-2050.22.13/bsd/miscfs/specfs/spec_vnops.c:1813
Backtrace (CPU 0), Frame : Return Address
0xffffff80b3db3c20 : 0xffffff8018c1d626
0xffffff80b3db3c90 : 0xffffff8018d1edba
0xffffff80b3db3cd0 : 0xffffff8018d23c46
0xffffff80b3db3d20 : 0xffffff8018d10cb6
0xffffff80b3db3d60 : 0xffffff8018cf08a1
0xffffff80b3db3db0 : 0xffffff8018cf0021
0xffffff80b3db3df0 : 0xffffff8018cf0b9e
0xffffff80b3db3e20 : 0xffffff8018d1100f
0xffffff80b3db3e50 : 0xffffff8018f55b8d
0xffffff80b3db3ec0 : 0xffffff8018c39ce9
0xffffff80b3db3ef0 : 0xffffff8018c3c7e8
0xffffff80b3db3f20 : 0xffffff8018c3c65e
0xffffff80b3db3f50 : 0xffffff8018c1b70d
0xffffff80b3db3f90 : 0xffffff8018cb84a3
0xffffff80b3db3fb0 : 0xffffff8018ccd4ac
BSD process name corresponding to current thread: ssh
Mac OS version:
12D78
Kernel version:
Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
Kernel UUID: 3EB7D8A7-C2D3-32EC-80F4-AB37D61492C6
Kernel slide:     0x0000000018a00000
Kernel text base: 0xffffff8018c00000
System model name: MacBookPro4,1 (Mac-F42C89C8)
System uptime in nanoseconds: 1213636802424
last loaded kext at 70392580239: com.apple.filesystems.smbfs          1.8 (addr 0xffffff7f9ae0b000, size 229376)
last unloaded kext at 168892078080: com.apple.iokit.IOSCSIBlockCommandsDevice          3.5.5 (addr 0xffffff7f992ca000, size 90112)
loaded kexts:
foo.tun          1.0
foo.tap          1.0
com.apple.filesystems.smbfs          1.8
com.apple.driver.AppleBluetoothMultitouch          75.19
com.apple.driver.AppleHWSensor          1.9.5d0
com.apple.filesystems.autofs          3.0
com.apple.driver.DiskImages.ReadWriteDiskImage          345
com.apple.driver.DiskImages.RAMBackingStore          345
com.apple.driver.AudioAUUC          1.60
com.apple.driver.IOBluetoothSCOAudioDriver          4.1.3f3
com.apple.iokit.IOBluetoothSerialManager          4.1.3f3
com.apple.driver.AppleHDA          2.3.7fc4
com.apple.iokit.BroadcomBluetoothHCIControllerUSBTransport          4.1.3f3
com.apple.iokit.IOUserEthernet          1.0.0d1
com.apple.Dont_Steal_Mac_OS_X          7.0.0
com.apple.driver.ApplePolicyControl          3.3.0
com.apple.driver.AppleLPC          1.6.0
com.apple.driver.AppleUpstreamUserClient          3.5.10
com.apple.driver.AppleSMCPDRC          1.0.0
com.apple.driver.AppleSMCLMU          2.0.3d0
com.apple.GeForce          8.1.0
com.apple.driver.AppleBacklight          170.2.5
com.apple.driver.AppleMCCSControl          1.1.11
com.apple.driver.ACPI_SMC_PlatformPlugin          1.0.0
com.apple.driver.SMCMotionSensor          3.0.3d1
com.apple.driver.AppleUSBTCButtons          237.1
com.apple.driver.AppleUSBTCKeyboard          237.1
com.apple.driver.AppleIRController          320.15
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless          1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
com.apple.BootCache          34
com.apple.driver.XsanFilter          404
com.apple.iokit.IOAHCIBlockStorage          2.3.1
com.apple.driver.AppleIntelPIIXATA          2.5.1
com.apple.driver.AppleAHCIPort          2.5.1
com.apple.driver.AppleSmartBatteryManager          161.0.0
com.apple.driver.AppleUSBHub          5.5.5
com.apple.driver.AirPortBrcm43224          600.36.17
com.apple.driver.AppleFWOHCI          4.9.6
com.apple.iokit.AppleYukon2          3.2.3b1
com.apple.driver.AppleUSBEHCI          5.5.0
com.apple.driver.AppleUSBUHCI          5.2.5
com.apple.driver.AppleEFINVRAM          1.7
com.apple.driver.AppleRTC          1.5
com.apple.driver.AppleHPET          1.8
com.apple.driver.AppleACPIButtons          1.7
com.apple.driver.AppleSMBIOS          1.9
com.apple.driver.AppleACPIEC          1.7
com.apple.driver.AppleAPIC          1.6
com.apple.driver.AppleIntelCPUPowerManagementClient          196.0.0
com.apple.nke.applicationfirewall          4.0.39
com.apple.security.quarantine          2
com.apple.driver.AppleIntelCPUPowerManagement          196.0.0
com.apple.driver.IOBluetoothHIDDriver          4.1.3f3
com.apple.driver.AppleMultitouchDriver          235.29
com.apple.kext.triggers          1.0
com.apple.driver.DiskImages.KernelBacked          345
com.apple.iokit.IOSerialFamily          10.0.6
com.apple.driver.DspFuncLib          2.3.7fc4
com.apple.iokit.IOAudioFamily          1.8.9fc11
com.apple.kext.OSvKernDSPLib          1.6
com.apple.iokit.AppleBluetoothHCIControllerUSBTransport          4.1.3f3
com.apple.driver.AppleHDAController          2.3.7fc4
com.apple.iokit.IOHDAFamily          2.3.7fc4
com.apple.iokit.IOSurface          86.0.4
com.apple.iokit.IOBluetoothFamily          4.1.3f3
com.apple.iokit.IOFireWireIP          2.2.5
com.apple.driver.AppleGraphicsControl          3.3.0
com.apple.driver.AppleBacklightExpert          1.0.4
com.apple.driver.AppleSMBusController          1.0.11d0
com.apple.driver.IOPlatformPluginLegacy          1.0.0
com.apple.driver.IOPlatformPluginFamily          5.3.0d51
com.apple.nvidia.nv50hal          8.1.0
com.apple.NVDAResman          8.1.0
com.apple.iokit.IONDRVSupport          2.3.7
com.apple.iokit.IOGraphicsFamily          2.3.7
com.apple.driver.AppleSMC          3.1.4d2
com.apple.driver.AppleUSBMultitouch          237.3
com.apple.iokit.IOUSBHIDDriver          5.2.5
com.apple.driver.AppleUSBMergeNub          5.5.5
com.apple.driver.AppleUSBComposite          5.2.5
com.apple.iokit.IOSCSIArchitectureModelFamily          3.5.5
com.apple.iokit.IOATABlockStorage          3.0.2
com.apple.iokit.IOATAFamily          2.5.1
com.apple.iokit.IOAHCIFamily          2.3.1
com.apple.iokit.IOUSBUserClient          5.5.5
com.apple.iokit.IO80211Family          522.4
com.apple.iokit.IOFireWireFamily          4.5.5
com.apple.iokit.IONetworkingFamily          3.0
com.apple.iokit.IOUSBFamily          5.5.5
com.apple.driver.AppleEFIRuntime          1.7
com.apple.iokit.IOHIDFamily          1.8.1
com.apple.iokit.IOSMBusFamily          1.1
com.apple.security.sandbox          220.2
com.apple.kext.AppleMatch          1.0.0d1
com.apple.security.TMSafetyNet          7
com.apple.driver.DiskImages          345
com.apple.iokit.IOStorageFamily          1.8
com.apple.driver.AppleKeyStore          28.21
com.apple.driver.AppleACPIPlatform          1.7
com.apple.iokit.IOPCIFamily          2.7.3
com.apple.iokit.IOACPIFamily          1.4
com.apple.kec.corecrypto          1.0
Model: MacBookPro4,1, BootROM MBP41.00C1.B03, 2 processors, Intel Core 2 Duo, 2.4 GHz, 5 GB, SMC 1.27f3
Graphics: NVIDIA GeForce 8600M GT, GeForce 8600M GT, PCIe, 256 MB
Memory Module: BANK 0/DIMM0, 1 GB, DDR2 SDRAM, 667 MHz, 0xCE00000000000000, 0x4D342037305432393533455A332D43453620
Memory Module: BANK 1/DIMM1, 4 GB, DDR2 SDRAM, 667 MHz, 0x2C00000000000000, 0x3136485453353132363448592D3636374131
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8C), Broadcom BCM43xx 1.0 (5.10.131.36.16)
Bluetooth: Version 4.1.3f3 11349, 2 service, 18 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Serial ATA Device: KINGSTON SV300S37A120G, 120.03 GB
Parallel ATA Device: ST9500420AS, 500.11 GB
USB Device: Built-in iSight, apple_vendor_id, 0x8502, 0xfd400000 / 2
USB Device: USB Receiver, 0x046d  (Logitech Inc.), 0xc52b, 0x1a200000 / 3
USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x1a100000 / 2
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x820f, 0x1a110000 / 4
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0230, 0x5d200000 / 3
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x5d100000 / 2
I can't currently use my script because of this and it is very crucial for me.
Anyone has any idea why this is happening?
Thanks in advance!

rsonnens wrote:
Etresoft, Yes you are correct I did post the same link. Sorry that I did not notice it. However, as Gajillion also noted in his post, it is a kernel timing/race condition bug and NOT a 3rd party extension bug and can only be fixed by Apple. There is nothing someone can practically do to workaround the issue.
My suggestion for everyone having this issue is to entering a case into Apple's bug tracking system, and every time you get the error also be sure that you allow the reporter app to send the info to Apple.
No one is having this issue. The only people who have reported it have extensive 3rd party software installations. I have never seen a Perl-induced kernel panic on my Mac and I do some really crazy things with Perl - SOAP servers routed through launcd with my own transport protocols. No panics.
You are free to send in any panic or bug reports to Apple, should they arise. But I am quite confident that anyone encoutering such a problem really can't be said to be running OS X anymore. Once you make that many modifications, it is some hybrid Linux-style monster. And yes, such things panic if you look at them the wrong way - just like Linux.

Similar Messages

  • Calling perl script from SAP system

    Hi all,
    I would like to call script from a SAP system. How many ways I can do that. Please guide me.
    Thanks!

    In transaction SM69, you can define an external command.  This command can be a perl script, or anything else executable at the OS level.  Once defined, you can execute it with transaction SM49, or by defining a step in a background job to execute an external command, or by calling function module SXPG_CALL_SYSTEM in an abap program.
    Cheers,
    David.

  • Pcimxi module causing system panic

    We have an UltraSparc Solaris 9 system which is panicing relatively often. The panic seems to be coming from a NULL pointer being dereferenced in the pcimxi module.
    Sep 20 12:42:41 p02rfu01 panic[cpu0]/thread=2a100045d40:
    Sep 20 12:42:41 p02rfu01 unix: [ID 340138 kern.notice] BAD TRAP: type=31 rp=2a100045740 addr=8 mmu_fsr=0 occurred in module "pcimxi" due to a NULL pointer dereference
    We are running version 2.0.0 of the NICpcimxi package. I don't see any newer versions or patches available. Has anybody else experienced this problem? If so, any suggestions. Thanks!

    I've gotten some more info from our engineers regarding the problem as well. Evidently the system only panics when they are talking to the Spectrum Analyzer via PCI attached GPIB. You would think it is a GPIB problem, but the panic is from the pcimxi module. It doesn't always crash when connecting to the SA, however it can be frequent. The NIpcigpib software is 2.3, NICpcimxi is 2.0.0, and NICvisa is 3.1. The crash string is as follows:
    Sep 27 10:04:23 p02rfu01 ^Mpanic[cpu0]/thread=2a100045d40:
    Sep 27 10:04:23 p02rfu01 unix: [ID 340138 kern.notice] BAD TRAP: type=31 rp=2a100045740 addr=8 mmu_fsr=0 occurred in module "pcimxi" due to a NULL pointer dereference
    Sep 27 10:04:23 p02rfu01 unix: [ID 100000 kern.notice]
    Sep 27 10:04:24 p02rfu01 unix: [ID 839527 kern.notice] sched:
    Sep 27 10:04:24 p02rfu01 unix: [ID 520581 kern.notice] trap type = 0x31
    Sep 27 10:04:24 p02rfu01 unix: [ID 381800 kern.notice] addr=0x8
    Sep 27 10:04:24 p02rfu01 unix: [ID 101969 kern.notice] pid=0, pc=0x78154524, sp=0x2a100044fe1, tstate=0x4400001604, context=0xc6
    Sep 27 10:04:24 p02rfu01 unix: [ID 743441 kern.notice] g1-g7: 780292d8, 1c00, bb, fffffffffffffffe, 3000027e590, 10, 2a100045d40
    Sep 27 10:04:24 p02rfu01 unix: [ID 100000 kern.notice]
    Sep 27 10:04:24 p02rfu01 genunix: [ID 723222 kern.notice] 000002a100045470 unix:die+80 (31, 2a100045740, 8, 0, 7802bc27, 30004bc0c0b)
    Sep 27 10:04:24 p02rfu01 genunix: [ID 179002 kern.notice] %l0-3: 0000000000000000 00000000014135f0 000002a100045740 000002a100045638
    Sep 27 10:04:24 p02rfu01 %l4-7: 0000000000000031 000003000000e898 0000000000000000 0000000001111824
    Sep 27 10:04:25 p02rfu01 genunix: [ID 723222 kern.notice] 000002a100045550 unix:trap+874 (2a100045740, 0, 10000, 10200, 0, 1)
    Sep 27 10:04:25 p02rfu01 genunix: [ID 179002 kern.notice] %l0-3: 0000000000000001 0000000000000000 0000000001437b28 0000000000000031
    Sep 27 10:04:25 p02rfu01 %l4-7: 0000000000000005 0000000000000001 0000000000000000 0000000000000000
    Sep 27 10:04:25 p02rfu01 genunix: [ID 723222 kern.notice] 000002a100045690 unix:ktl0+48 (fffffffffffffffe, 3000027e590, 101, 7802bc18, 2a10072ae9c, 2a10072ae98)Sep 27 10:04:25 p02rfu01 genunix: [ID 179002 kern.notice] %l0-3: 0000000000000005 0000000000001400 0000004400001604 000000000102bf54
    Sep 27 10:04:25 p02rfu01 %l4-7: 000000007802bc18 fffffffffffffffe 0000000000000006 000002a100045740
    Sep 27 10:04:26 p02rfu01 genunix: [ID 723222 kern.notice] 000002a1000457e0 pcimxi:HandleVIRQLevel+78 (0, ffffff50, 1, 7802bc18, ffffffffffffffff, 2a10072b0d4)
    Sep 27 10:04:26 p02rfu01 genunix: [ID 179002 kern.notice] %l0-3: 0000000000000000 0000000000000000 0000000000000000 0000030004e1a000
    Sep 27 10:04:26 p02rfu01 %l4-7: 000003000000b170 000003000000b198 000003000000b1c0 00000300038c4c88
    Sep 27 10:04:26 p02rfu01 genunix: [ID 723222 kern.notice] 000002a1000458f0 pcimxi:HandleVSID+140 (0, ffff2900, 20, 0, 100c4f4, 0)
    Sep 27 10:04:26 p02rfu01 genunix: [ID 179002 kern.notice] %l0-3: 0000000000000000 0000000000000280 0000000000000000 0000000001400428
    Sep 27 10:04:26 p02rfu01 %l4-7: 0000000001400000 0000000000000016 00000000014007e8 0000030003c231f8
    Sep 27 10:04:27 p02rfu01 genunix: [ID 723222 kern.notice] 000002a1000459c0 pcimxi:handleEvent+d0 (ffff2900, 2a100045d40, 20, 0, 29, 0)
    Sep 27 10:04:27 p02rfu01 genunix: [ID 179002 kern.notice] %l0-3: 0000000078029
    800 0000000078154290 0000000000000000 00000000ffff2900
    Sep 27 10:04:27 p02rfu01 %l4-7: 00000000000000c2 00000000000019c8 00000000780281e8 0000000000000008
    Sep 27 10:04:27 p02rfu01 genunix: [ID 723222 kern.notice] 000002a100045a80 pcimxi:vxi_softintr+74 (30004a01cf8, 85d, 1400000, 2a100045d40, 10ba0, 78142d38)
    Sep 27 10:04:27 p02rfu01 genunix: [ID 179002 kern.notice] %l0-3: 00000000ffff2900 0000030004a01cf8 0000000000000001 0000000000000001
    Sep 27 10:04:27 p02rfu01 %l4-7: 0000030000265ae8 00000000780281e8 00000000014d2000 00000000014d2000
    I can get you a crash dump if it will help any (we have lots of them). Thanks.
    Randy

  • Perl Script Execution

    Is there a way to execute a Perl/Cgi scripts in Cold fusion Built in Server. Actually I have tested my scripts in Apache Server by putting my cgi scripts in cgi-bin but in the Coldfusion built in Server we are having does not contain a cgi-bin. So what is the alternate way that can be used to execute a cgi script in the cold fusion built in Server.

    What do you want to execute the Perl?  The web server or the application server?
    I don't know if the built in web server can execute Perl|CGI, I have never heard of it.  I would not be surprised if it did NOT do this.  The built-in server is intended for development and testing of ColdFusion application code.  Thus it is not a full featured web server and not intended to be used in a production enviornment.
    But if you want to execute Perl code as part of a ColdFusion application, the <cfexecute....> command is perfectly capable of doing this from the applciation server.  That means the resulst of the Perl code, if there are any, are returned to the ColdFusion application domain rather then the user domain that would happend if the CGI code was been executed by the web server.

  • Grid Control Perl Scripts Causing 100% CPU

    I have a Grid installation on a cluster of three databases. It periodically shows that the CPU is at 100%. When I check, it is a number of Perl scripts that are executed by the agent.
    Killing the Perl scripts returns CPU usage back to normal. The operating system is Red Hat, and the databases and clusterware Oracle 10.2.0.4.
    Anyone have experience with this. I've looked on Metalink, but haven't seen anything.
    Thanks,
    John

    I nearly fell off my chair laughing at the ludicrous suggestion of bouncing the box!!!
    When you say: Grid installation on a cluster of three databases
    What do you mean?!
    Grid control monitoring 3 rac databases?
    Grid control with a rac database as its repository?
    Version of Grid control?!

  • Cron running Perl script causes Out Of Memory at 63000kb

    Hi,
    I run a script to record an internet steam at set times using cron (i'm using icecream, a perl script). This runs fine when executed by 'at' or manually form the command line, but when it is started by cron it dies with the error 'Out of memory!'. The machine isn't extremely powerful but is more than capable of doing this simple task!
    From my research I understand that it may have something to do with the /etc/security/limits.conf file, though apparently changing these values often don't have the desired effects.
    The output of 'ulimit -a' is as follows (I can't see any limiting factors here):
    [aratclif@server ~]$ ulimit -a
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 20
    file size (blocks, -f) unlimited
    pending signals (-i) 1931
    max locked memory (kbytes, -l) 64
    max memory size (kbytes, -m) unlimited
    open files (-n) 1024
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 1931
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited
    [aratclif@server ~]$
    and the crond.log output when it died is here (there is nothing else of any relevance in the log - just a load of song names broadcasted by the stream!)
    (aratclif) CMDOUT (
    LED ZEPPELIN - WHOLE LOTTA LOVE [63000 K]Out of memory!)
    The command is started by my user's crontab and so the ulimit displayed by cron is the same as when executed from the command line:
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1308]: (aratclif) CMD (ulimit -a)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (core file size (blocks, -c) 0)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1309]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (data seg size (kbytes, -d) unlimited)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (scheduling priority (-e) 20)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (file size (blocks, -f) unlimited)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (pending signals (-i) 1931)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (max locked memory (kbytes, -l) 64)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (max memory size (kbytes, -m) unlimited)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (open files (-n) 1024)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (pipe size (512 bytes, -p) 8)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (POSIX message queues (bytes, -q) 819200)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (real-time priority (-r) 0)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (stack size (kbytes, -s) 8192)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (cpu time (seconds, -t) unlimited)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (max user processes (-u) 1931)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (virtual memory (kbytes, -v) unlimited)
    Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (file locks (-x) unlimited)
    Any help would be greatly appreciated!
    Thanks!
    Last edited by ajratcliffe (2012-04-10 23:13:01)

    No, the files are all the same. It seems like just a few are causing the issue, and what's weird, is some of them are cut versions from clips that elsewhere in the timeline render fine.

  • Gui freezes during execution of a perl script which is never completed

    Dear Java programmers,
    I'm running a perl script which takes a few minutes to finish from a GUI. But when the execution reaches a point, it suddenly seems to stop and the GUI becomes irresponsive. Submitting the perl script to run as a separate thread to release the button doesn't make any different either. Is there any restriction in the time that swing allows external programs to run?
    thanks in advance,
    Tom

    tevang2 wrote:
    I'm running a perl script which takes a few minutes to finish from a GUI. But when the execution reaches a point, it suddenly seems to stop and the GUI becomes irresponsive. Then you're tying up the Swing EDT, the event dispatch thread, which is the single thread responsible for drawing the Swing app and responding to user input.
    Submitting the perl script to run as a separate thread to release the button doesn't make any different either. Is there any restriction in the time that swing allows external programs to run?None that I know of. I still have to wonder if you are creating a background thread properly because even if your perl script gets locked, if you are running it on a background thread, the Swing app shouldn't lock up.

  • Execution of Perl Script from HTML DB page.

    Hi All,
    I have a Perl script which takes 5 parameters and fetches data from one database and insert that data into my database table which is a master table for my project.
    Is there any way to execute the perl script from a HTMLDB page by passing parameters.
    Pls. provide me inputs if any.
    Thanks & Regds.
    Kumaraswamy RJ.

    Check out MOS note 1515609.1.
    Regards,
    - Loc

  • In Web Server 6.0 during the execution of a Perl Script, the software send the error "Cannot execute CGI script......unable to sewt group".

     

    Hi Pablo,
    Its bcos Your web server has been misconfigured. It doesn't know that it should execute your Perl program, so it's just returning the error to the browser.
    Assuming that u use solaris 2.8. Generally the path for the perl in solaris is #!/usr/bin/perl .make sure u have included this in ur first line of the perl programs.[if not enter the exact location of the perl interpretor]
    Now follow these steps:
    *First Part
    First create a cgi folder mycgi-bin( follow this example please) say u create mycgi in /usr folder (solaris). so the path becomes '/usr/mycgi-bin'. set
    appropriate permissions say set chmod to 755. to make it executable. Then
    (1)Goto Programs tab in IWS (iplanet web server) .
    (2)choose cgi-directory drom left frame.
    (3)CGI Directory Add another CGI Directory
    URL prefix: mycgi-bin
    CGI directory: /usr/mycgi-bin
    (4) click 'OK' and click 'apply' to save changes and restart the server.
    * Second Part:
    1.In the Server Administrator, click Server preferences, then select 'MIME Types' from the frame on the left.
    2.If you want to use .pl as the extension for Perl scripts, find and remove the application/x-perl MIME type (this is mapped to .pl by default). (remove it).
    3.Add a new MIME Type with 'magnus-internal/mycgi-bin' (type this exactly ie magnus-internal/cgidirectory url prefix) as the Content Type, and pl as the File Suffix.
    4.Save and apply these changes, then re-start the server.
    5 .Put a sample perl file in mycgi-bin directory say sample.pl and access http://yourserver:port/mycgi-bin/sample. pl
    *If you are having trouble running Perl scripts on your iPlanet server, check the following:
    * Ensure that the script is readable by the account used by the iPlanet service.Generally, this means you should make the script readable by the Everyonegroup.
    * Ensure that all supporting files, like the perl binary files, the perl library files, and the modules that you use, are all readable by the account used by the iPlanet service (i.e., the Everyone group).
    It should work now,
    Regards,
    T.Raghulan

  • Best method for timestamping? (for later use with perl script)

    What is the best method that I can use to timestamp events in Linux for later use with perl script?
    I am performing some energy measurements.. where I am running several tasks separated by 20 secs in between. Before I start any execution of tasks, I always place initial delay for me to start the script and start the measurement device.
    My problem is that I don't know how long is that first delay exactly. So to solve this, I thought I could use date commands to time stamp all tasks.. or at least to timestamp first dela.
    Here is example of what I am doing:
    1st delay
    task 1
    20s
    task 2
    20s
    task 3..... etc
    What would be the best to use?

    logger.
    It posts messages straight to the system log.  You can see the message, in all its glory using tools like journalctl.  You will see the message, the date, time, host name, user name, and the PID of logger when it ran.

  • PERL script on Solaris

    My ISP is running on solaris. I have place a PERL (.pl) script which will fire a mail. He says 'Sendmail' is configured and I can create any folder and place my script and system will recognize is automatically. As we know, all the web servers will have 'cgi-bin' directory where the .pl or .cgi files will be placed for execution. My ISP tells me that he has configured the server in such a way that I can create a 'cgi' directory anywhere and can run it from the browser. I am unable to do it. Tell me how I can do it.

    Unfortunately this stupid perl script isn't that
    easy. It uses Rational cqperl, then some libraries
    and modules I don't understand. I can't even find
    the actual code it uses that uses flexlm.
    That's why I was asking what is different with java
    1.2 and java 1.4. Is there some way that Runtime
    acts differently?Not in any fundamental way that I am aware of.
    The fact that the script is running at all though tells me that the problem is on the PERL side of things. I suspect that some of those modules and libraries are not being loaded correctly or the same way on both systems.
    I fear the answer is that you need to figure out what components the script needs to run and make sure that it has them under all circumstances. This is like a classpath problem except it is with your PERL script so you need to solve it as a PERL problem.
    Again if it wasn't running at all that would be one concern but it is running just not finding all it's bits.. a problem of that nature strongly indicates that the issue is happening once the process has already been spawned (correctly) and so is out of the realm of the Java part of your program.

  • Calling perl script from java ---help needed

    I haven't been doing a lot with java lately and i'm building an app with netbeans and having some difficulty with my button calling an outside perl script I'm pasting the code and error below...any help would be greatly appreciated. It's running on fedora 9 pretty much default install...
    thanks.
    code:
    Runtime r = Runtime.getRuntime();
    Process p = null;
    String s = null;
    String cmd123[] = { "perl /home/deaddev/test1.pl" };
    try {
    p = r.exec(cmd123);
    catch {
    foo bar/etc/etc
    error:
    Oct 12, 2008 4:09:37 PM photomainmgr readToPerlActionPerformed
    SEVERE: null
    java.io.IOException: Cannot run program "perl /home/deaddev/test1.pl": java.io.IOException: error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:474)
    at java.lang.Runtime.exec(Runtime.java:610)
    at java.lang.Runtime.exec(Runtime.java:483)
    at photomainmgr.readToPerlActionPerformed(photomainmgr.java:117)
    at photomainmgr.access$000(photomainmgr.java:21)
    at photomainmgr$1.actionPerformed(photomainmgr.java:54)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
    at java.awt.Component.processMouseEvent(Component.java:6101)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
    at java.awt.Component.processEvent(Component.java:5866)
    at java.awt.Container.processEvent(Container.java:2105)
    at java.awt.Component.dispatchEventImpl(Component.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2163)
    at java.awt.Component.dispatchEvent(Component.java:4288)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
    at java.awt.Container.dispatchEventImpl(Container.java:2149)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4288)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
    Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
    at java.lang.ProcessImpl.start(ProcessImpl.java:81)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:467)
    ... 30 more
    error executing perl /home/deaddev/test1.pl

    jschell wrote:
    sabre150 wrote:
    As and alternative you can useString cmd123 = "perl /home/deaddev/test1.pl";Using the single string approach YOU have to do any quoting so with this line no quoting takes place and the script /home/deaddev/test1.pl will be executed.Although that should be true apparently it isn't. I have just run  
    Process p = Runtime.getRuntime().exec("perl /home/sabre/work/dev/perl/xxx.pl");
    new Thread(new SyncPipe(p.getErrorStream(), System.err)).start();
    new SyncPipe(p.getInputStream(), System.out).run();
    int returnCode = p.waitFor();
    System.out.println("Return code = " + returnCode);which correctly executes the perl script xxx.pl.
    P.S. SyncPipe is a Runnable that copies an InputStream to an OutputStream.
    Edited by: sabre150 on Oct 14, 2008 9:19 AM
    Interesting! Even though Runtime.exec() works with a single String, ProcessBuilder fails with this approach! You have to split the argument string. This certainly looks like a bug! Some while ago I looked at the source for Runtime.exec() to look at the differences between Runtime.exec() and ProcessBuilder and found that behind the scenes Runtime.exec() uses ProcessBuilder.
    More research is required.

  • Execute a shell or perl script

    Is it possible to execute a unix(solaris) shell script or perl script from a stored procedure. If so, a short example would be great.
    Thanks,
    John

    External Procedure Source Code
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    void sh(char *);
    void sh( char *cmd )
    int num;
    num = system(cmd);
    Issue the following commands to compile the code and generate the shared
    object in Solaris:
    cc -G -c shell.c
    ld -r -o shell.so shell.o
    You can also use the demo_rdbms.mk makefile to build shared libraries for use in external procedures. Using this method insulates you from any Operating System specific dependencies (e.g., which flags to use
    for ld).
    For example:
    In 8.0.X,
    $ make -f demo_rdbms.mk extproc_nocallback \
    SHARED_LIBNAME=shell.so OBJS=shell.o
    In 8.1.X,
    $ make -f demo_rdbms.mk extproc_no_context \
    SHARED_LIBNAME=shell.so OBJS=shell.o
    Library Definition
    CREATE LIBRARY shell_lib is '/u11/home/lsupport/proc/shell.so';
    Note: The directory in quotes is the current of location of the library that
    was created in the steps above.
    PL/SQL Wrapper Procedure
    create or replace procedure shell(cmd IN char)
    as external
    name "sh"
    library shell_lib
    language C
    parameters (cmd string);
    Execution
    SQL> exec shell('ls');
    cli.trc exe_prba.sql prueba.mk shell.c.old
    core listener.old prueba.o shell.o
    dec2bin.c listener.ora prueba.so shell.so
    dec2bin.c.old nena.lst prueba.sql shell.sql
    dec2bin.o p.sql sal.1 shell.sql.old
    dec2bin.so pepito.lst sal.2 sqlnet.log
    dec2bin.sql prb sal.3 tnsnames.ora
    dec2bin.sql.old prb.c salida.lst tnsnames.ora.old
    envoltorio.sql prueba.c shell.c uno.sql
    PL/SQL procedure successfully completed.

  • Folder Action to Launch Perl Script

    Hello.
    I wrote a perl script which I wanted to execute when a file was dropped into a folder. I added a folder action with a very simple applescript:
    on adding folder items to this_folder after receiving added_items
    do shell script ¬
    ("perl /Users/Alexander/Library/Scripts/gte2.pl")
    end adding folder items to
    The folder action didn't do anything, any thoughts on what I'm doing wrong? Note, the perl script works fine when I run it from the terminal.
    thanks.

    Thanks Camelot, I appreciate the help. My script below is trying to read data from a file in folder in my system. So I will try your suggestion, I didn't realize the environment and path my be different.
    Regards Alex
    #!/usr/bin/perl -w
    #This program is to convert files from gamin running GPS watch to text file which can be loaded into excel.
    # To make executable, remember to set: chmod u+x <file>
    #set all the flags. Note the flags are used to stop the matching
    $i = 1; $k = 0; $start = "no";
    #Open data file and find values
    open(DATA,"/Users/Alexander/Alex's Misc/Health/Garmin_Conversion/run.tcx") || die "Couldn't open file*\n";
    #read in the data line by line until "end of file"
    while (<DATA>){
    #start parsing for information to keep
    if (/.<Id>./) {
    @Idline=split(/>/);
    @Idbeat=split(/T/,$Idline[1]);
    $Id=$Idbeat[0];
    if (/.<Track>./){
    $start = "yes";
    if ($start eq "yes"){
    if (/.<Time>./) {
    @timeline=split(/T/);
    @timebeat=split(/Z/,$timeline[2]);
    $Time[$i]=$timebeat[0];
    elsif (/.<LatitudeDegrees>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $Latitude[$i]=$latbeat[0];
    elsif (/.<LongitudeDegrees>./) {
    @longline=split(/>/);
    @longbeat=split(/</,$longline[1]);
    $Longitude[$i]=$longbeat[0];
    elsif (/.<AltitudeMeters>./) {
    @altline=split(/>/);
    @altbeat=split(/</,$altline[1]);
    $Altitude[$i]=$altbeat[0];
    elsif (/.<DistanceMeters>./) {
    @distline=split(/>/);
    @distbeat=split(/</,$distline[1]);
    $Distance[$i]=$distbeat[0];
    elsif (/.<Value>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $HR[$i]=$HRbeat[0];
    $i++;
    } #string matching
    } #if start flag is yes
    } #while data loop
    close (DATA) || die "couldn't close file.\n";
    #write all data to file in space delimited format
    open (NEWFILE, ">/Users/Alexander/Alex's Misc/Health/Garmin_Converted/$Id run") || die "can't create file.\n";
    $Time[0]="Time"; $Latitude[0]="Latitude"; $Longitude[0]="Longitude"; $Altitude[0]="Altitude"; $Distance[0]="Distance"; $HR[0]="HR";
    print NEWFILE "0 $Time[0] $Latitude[0] $Longitude[0] $Altitude[0] $Distance[0] $HR[0]\n";
    for ($j = 1; $j <= $i; $j++) {
    $k=$j+1;
    print NEWFILE "$j $Time[$j] $Latitude[$j] $Longitude[$j] $Altitude[$j] $Distance[$j] $HR[$j]\n";
    } #for j loop
    close (NEWFILE) || die "couldn't close newfile.\n";
    #This is the end of the program

  • Runtime.exec("Perl Script writing and reading on I/O"), handling Streams

    Hi all !!
    In a first place : sorry for my english if it's not really understandable but I try to do as good as possible !
    I'm writing a GUI with Swing that will allow (in one of my multiple tables) the user to run a Perl Script.
    This Perl Script ask the user to choose a Folder ... then read all the files in this folder and for each file (xml File), extract the datas and put them in a database. But when a file that has to be inserted in the database contains this line : <Template_Used name="ST1.mtt"> and if the Template table in my database doesn't have the "ST1.mtt" stored ... the Perl Script ask to the user to give him the path of the file "ST1.mtt" so that the script can put the "ST1.mtt template" datas in the database.
    This script runs well when it is from a windows console.
    But I need a graphic interface !!!
    So I created a JButton "Process a folder".
    When the button is pressed, a JFileChooser appears and ask the user which Folder has to be processed.
    Then a Process is created with the command : ("cmd.exe /C \"C:\\Program Files\\Fluke\\Ansur\\ProcessFolder.bat\").
    The BatFile :
    {code}cd C:\Documents and Settings\tsd\Desktop\Gael-Project\Project_Files
    perl Process.pl
    exit{code}
    At this moment everything is working well.
    But my Process.pl (which is 300 lines long ... and that you don't even want to hear about), ask in a first time the Path of the folder to process and sometimes ask the path to a file (a template file).
    So I need to read and wirte on the STDIN/STDOUT during the exec of the Process.
    In order to handle this I created two different threads : one reading the Process.getInputStream with a BufferedReader and one other writing on the Process.getOutputStream with a PrintWrinter.
    What I need to do is :
    When I read a line from the InputStream saying "I need the path of the ST1.mtt file", I should run a JFileChooser ... the user find the file in the computer ... and I write in the OutputStream the path of the file, so that my Perl Script doesn't have un Unitialised value on <STDIN> and can continue to process !!
    I'm pretty sure it's possible ... because at the moment I just used a trick :
    When the user push the "process a folder" button, I write the paths in the OutputStream before than the script needs it and it works !
    But I need to write in the OutputStream only when it is time !!!
    Any idea ??
    Here are some parts of my code :
    {code}
    String filename = File.separator+"tmp";
              JFileChooser fc = new JFileChooser(new File(filename));
              fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY );
              // Show open dialog; this method does not return until the dialog is closed
         fc.showOpenDialog(null);
         Folder = fc.getSelectedFile();
              new GoodExec(cmd);
    {code}
    {code}
    public class GoodExec {
         public static Process proc;
         public static StreamGobbler errorGobbler;
         public static StreamGobbler inputGobbler;
         public static StreamGobbler outputGobbler;
         public GoodExec(String cmd)
         try
                   Runtime rt = Runtime.getRuntime();
              proc = rt.exec(cmd);
         // any error message?
         errorGobbler = new
         StreamGobbler(proc.getErrorStream(), "ERROR");
         // any input?
         inputGobbler = new
         StreamGobbler(proc.getInputStream(), "INPUT");
         // any output?
              outputGobbler = new
              StreamGobbler(proc.getOutputStream(), "OUTPUT");
         // kick them off
         errorGobbler.start();
         inputGobbler.start();
         outputGobbler.start();
         // any error???
         int exitVal = proc.waitFor();
         System.out.println("ExitValue: " + exitVal);
         } catch (Throwable t)
         t.printStackTrace();
    {code}
    {code}
    public class StreamGobbler implements Runnable
    InputStream is;
    OutputStream os;
    String type;
    Thread thread;
    public static String chaine;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.os=null;
    this.type = type;
    StreamGobbler(OutputStream os, String type)
    this.os = os;
    this.is=null;
    this.type = type;
    public void start () {
         thread = new Thread(this);
         thread.start ();
    public void run()
    try
    if (is == null){
         PrintWriter toProgram = new PrintWriter(os);
         File FolderToProcess = ProcessFolder.Folder;
    String Folder = FolderToProcess.getPath();
    toProgram.write(Folder);
    toProgram.close();
    else {
         if (os == null){
         InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    String comp = "Please enter the exact path of the directory that contains the files you want to process.";
    while ( (line = br.readLine()) != null){
         if (type.equals("INPUT")){
              chaine+=line+"\n";
         if (line.equals(comp)) {
              System.out.println("give directory");RUN A JFILECHOOSER AND GIVE THE DIRECTORY TO THE OUTPUTSTREAM
    System.out.println(type + ">" + line);
    is.close ();
    catch (IOException ioe){
         ioe.printStackTrace();
    {code}
    And here is an example of a simple perl script that could be used (it s a simple one !!) :
    {code}
    #!/usr/bin/perl -w
    use strict;
    print "Please enter the exact path of the directory that contains the files you want to process.\n";
    my $dir= <STDIN>;
    chomp ($dir);
    print "titallala $dir";
    if (the template of the file is not in the database){
    print "Please give me the template so that I can put it in the database";
    $dir= <STDIN>;
    chomp ($dir);
    {code}
    Thank you for your help ... if it's possible to help me !!
    Gael

    BalusC -- The line that gives me my NullPointerException is when I call the "DisplayProduct()" method. Its a dumb question, but with NetBeans how do I find out which reference could be null? I'm not very familiar with how NetBeans works with finding out how to debug. Any help you can give me would be greatly appreciated.The IDE is com-plete-ly irrelevant. It's all about the source code.
    Do you understand anyway when and why a NullPointerException is been thrown? It is a subclass of RuntimeException and those kind of exceptions are very trival and generally indicate an design/logic/thinking fault in your code.
    SomeObject someObject = null; // The someObject reference is null.
    someObject.doSomething(); // Invoking a reference which is null would throw NPE.

Maybe you are looking for

  • Delivery Date on Sale Order

    Hi All, In Sale Order document, In some cases the delivery date may be 2-3 yrs from the order date. So when Iam trying to give the same in due date, its showing an error message saying that "Date deviates from the permissable range [Sales Order-DUe D

  • Can I cancel game center's content for every games?

    當我拿起我的手機,並希望有一個有趣的時間,遊戲中心將彈出,這意味著先關閉它,然後我可以盡情發揮. 所以我覺得這個功能不是很好,親切 在接下來的  版本更新(8.3.1?/8.4?)  我希望可以刪除或修復它. 非常感謝 您的  謙虛提問者

  • Dynamic selectionof selection-screen

    parameters table1. parameters input. i have enter dynamic text into table1 like table1 = vbak. i like to see instead of input as table1(i.e vbak) on selection-screen when user dynamically gives value of table1  help me plz <b></b><b></b><b></b><b></b

  • Record rtsp streams with azure media services

    Hello.  I see that Azure media service now has rtsp streaming support, but, as I understand, it can stream videos from azure, but what about recording of incoming rtsp streams? Is it possible to record rtsp streams with Azure media Service? Andrey

  • Connect to iTunes after software update

    After doing an update to 7.03, it keeps saying "Connect to iTunes", i then restore it and it then fails. Any ideas? Thanks