1 Reply Latest reply: Mar 29, 2010 11:16 PM by 807567 RSS

    shmat problem - is it specific to Solaris 10

    807567
      I tried to run an application on Solaris 10 - it came up with an error. The truss showed that it is to do with shmat (the first shmat seemed to succeed but the second one failed with EINVAL). This ran ok on Solaris 8. This stopped us from buying new servers to run it on Solaris 10.

      getuid() = 0 [0]
      open("/apps/uv/.uvconfig", O_RDONLY) = 3
      read(3, "\0\0\0\00101010101010101".., 4096) = 4096
      close(3) = 0
      shmget(-1393781213, 12632940, 0666) = 64
      shmat(64, 0x137F4000, 0) = 0x137F4000
      shmget(-1394601420, 10240, 0666|IPC_CREAT) = 65
      shmat(65, 0x1433C000, 0) Err#22 EINVAL
      ioctl(1, TCGETA, 0xFFBFC484) = 0
      fstat64(1, 0xFFBFC3A0) = 0
      Unable to attach printer shared memory segment
      write(1, " U n a b l e t o a t".., 47) = 47
      _exit(-1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
        • 1. Re: shmat problem - is it specific to Solaris 10
          807567
          Sorry. The problem actually is not in the Solaris 10. I saw thise happened on the Solaris 8 server where the same application was copied from. It was some uvconfig problem - which might end up ipc calls incorrectly called. Fiddling with uvconfig fix the issue.

          getuid() = 0 [0]
          open("/apps/uv/.uvconfig", O_RDONLY) = 3
          read(3, "\0\0\0\00101010101010101".., 4096) = 4096
          close(3) = 0
          shmget(-1393781213, 8193932, 0666) = 12
          shmat(12, 0x137F4000, 0) = 0x137F4000
          shmget(-1394601420, 10240, 0666|IPC_CREAT) = 18
          shmat(18, 0x1433C000, 0) = 0x1433C000
          fstat64(255, 0xFFBFD1E8) Err#9 EBADF