Solaris 10 X86下配置Bind 9.6.1后,想用chroot,提示ioctl(DP_POLL)參數錯誤,求救!

火星人 @ 2014-03-04 , reply:0
←手機掃碼閱讀

Solaris 10 X86下配置Bind 9.6.1后,想用chroot,提示ioctl(DP_POLL)參數錯誤,求救!

每次運行/usr/sbin/chroot /dns /usr/local/sbin/named -u named后都提示錯誤:
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: found 2 CPUs, using 2 worker threads
Jun 29 10:26:44 Solaris2 named: using up to 4096 sockets
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: found 2 CPUs, using 2 worker threads
Jun 29 10:26:44 Solaris2 named: using up to 4096 sockets
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)

後來運行truss /usr/sbin/chroot /dns /usr/local/sbin/named -u named的結果如下,哪位大哥幫忙看看問題出在哪裡,謝謝!

Solaris# truss /usr/sbin/chroot /dns /usr/local/sbin/named -u named
execve("/usr/sbin/chroot", 0x08047D18, 0x08047D30)  argc = 5
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD17F0000
resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
resolvepath("/usr/sbin/chroot", "/usr/sbin/chroot", 1023) = 16
sysconfig(_CONFIG_PAGESIZE)                     = 4096
stat64("/usr/sbin/chroot", 0x08047AB0)          = 0
open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
stat64("/lib/libc.so.1", 0x08047350)            = 0
resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
open("/lib/libc.so.1", O_RDONLY)                = 3
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xD17B0000
mmap(0x00010000, 1212416, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1680000
mmap(0xD1680000, 1102069, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1680000
mmap(0xD179E000, 30183, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1105920) = 0xD179E000
mmap(0xD17A6000, 4240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xD17A6000
munmap(0xD178E000, 65536)                       = 0
memcntl(0xD1680000, 123884, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1790000
munmap(0xD17B0000, 32768)                       = 0
getcontext(0x08047920)
getrlimit(RLIMIT_STACK, 0x08047918)             = 0
getpid()                                        = 14693
lwp_private(0, 1, 0xD1792A00)                   = 0x000001C3
setustack(0xD1792A60)
sysi86(SI86FPSTART, 0xD17A6740, 0x0000133F, 0x00001F80) = 0x00000001
chroot("/dns")                                  = 0
chdir("/")                                      = 0
execve("/usr/local/sbin/named", 0x08047D20, 0x08047D30)  argc = 3
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD17F0000
resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
resolvepath("/usr/local/sbin/named", "/usr/local/sbin/named", 1023) = 21
xstat(2, "/usr/local/sbin/named", 0x08047B08)   = 0
open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
xstat(2, "/usr/local/ssl/lib/libcrypto.so.0.9.8", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libcrypto.so.0.9.8", 0x08047338) = 0
resolvepath("/usr/lib/libcrypto.so.0.9.8", "/usr/lib/libcrypto.so.0.9.8", 1023) = 27
open("/usr/lib/libcrypto.so.0.9.8", O_RDONLY)   = 3
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xD17B0000
mmap(0x00010000, 1327104, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1660000
mmap(0xD1660000, 1162005, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1660000
mmap(0xD178B000, 90108, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1159168) = 0xD178B000
mmap(0xD17A1000, 9448, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xD17A1000
munmap(0xD177C000, 61440)                       = 0
memcntl(0xD1660000, 222860, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
sysconfig(_CONFIG_PAGESIZE)                     = 4096
xstat(2, "/usr/local/ssl/lib/libnsl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libnsl.so.1", 0x08047338)    = 0
resolvepath("/usr/lib/libnsl.so.1", "/usr/lib/libnsl.so.1", 1023) = 20
open("/usr/lib/libnsl.so.1", O_RDONLY)          = 3
mmap(0xD17B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD17B0000
mmap(0x00010000, 647168, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD15C0000
mmap(0xD15C0000, 525089, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD15C0000
mmap(0xD1651000, 19869, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 528384) = 0xD1651000
mmap(0xD1656000, 30032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xD1656000
munmap(0xD1641000, 65536)                       = 0
memcntl(0xD15C0000, 57812, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libsocket.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libsocket.so.1", 0x08047338) = 0
resolvepath("/usr/lib/libsocket.so.1", "/usr/lib/libsocket.so.1", 1023) = 23
open("/usr/lib/libsocket.so.1", O_RDONLY)       = 3
mmap(0xD17B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD17B0000
mmap(0x00010000, 114688, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD15A0000
mmap(0xD15A0000, 43986, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD15A0000
mmap(0xD15BB000, 2645, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 45056) = 0xD15BB000
munmap(0xD15AB000, 65536)                       = 0
memcntl(0xD15A0000, 12080, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libscf.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libscf.so.1", 0x08047338)    = 0
resolvepath("/usr/lib/libscf.so.1", "/usr/lib/libscf.so.1", 1023) = 20
open("/usr/lib/libscf.so.1", O_RDONLY)          = 3
mmap(0xD17B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD17B0000
mmap(0x00010000, 159744, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1570000
mmap(0xD1570000, 89784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1570000
mmap(0xD1596000, 1873, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 90112) = 0xD1596000
munmap(0xD1586000, 65536)                       = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD17C0000
memcntl(0xD1570000, 14596, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libpthread.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libpthread.so.1", 0x08047338) = 0
resolvepath("/usr/lib/libpthread.so.1", "/usr/lib/libpthread.so.1", 1023) = 24
open("/usr/lib/libpthread.so.1", O_RDONLY)      = 3
mmap(0xD17B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD17B0000
munmap(0xD17B3000, 20480)                       = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libthread.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libthread.so.1", 0x08047338) = 0
resolvepath("/usr/lib/libthread.so.1", "/usr/lib/libthread.so.1", 1023) = 23
open("/usr/lib/libthread.so.1", O_RDONLY)       = 3
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xD1780000
munmap(0xD1784000, 16384)                       = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libxml2.so.2", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libxml2.so.2", 0x08047338)   = 0
resolvepath("/usr/lib/libxml2.so.2", "/usr/lib/libxml2.so.2", 1023) = 21
open("/usr/lib/libxml2.so.2", O_RDONLY)         = 3
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xD15B0000
mmap(0x00010000, 1200128, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1440000
mmap(0xD1440000, 1090616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1440000
mmap(0xD155A000, 38228, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1089536) = 0xD155A000
mmap(0xD1564000, 288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xD1564000
munmap(0xD154B000, 61440)                       = 0
memcntl(0xD1440000, 116324, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libz.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libz.so.1", 0x08047338)      = 0
resolvepath("/usr/lib/libz.so.1", "/usr/lib/libz.so.1", 1023) = 18
open("/usr/lib/libz.so.1", O_RDONLY)            = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 126976, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1420000
mmap(0xD1420000, 58404, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1420000
mmap(0xD143E000, 2602, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 57344) = 0xD143E000
munmap(0xD142F000, 61440)                       = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD1590000
memcntl(0xD1420000, 4104, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libm.so.2", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libm.so.2", 0x08047338)      = 0
resolvepath("/usr/lib/libm.so.2", "/usr/lib/libm.so.2", 1023) = 18
open("/usr/lib/libm.so.2", O_RDONLY)            = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 352256, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD13C0000
mmap(0xD13C0000, 271027, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD13C0000
mmap(0xD1412000, 14852, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 270336) = 0xD1412000
munmap(0xD1403000, 61440)                       = 0
memcntl(0xD13C0000, 23396, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/usr/local/ssl/lib/libc.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/lib/libc.so.1", 0x08047338)      = 0
resolvepath("/usr/lib/libc.so.1", "/usr/lib/libc.so.1", 1023) = 18
open("/usr/lib/libc.so.1", O_RDONLY)            = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 1212416, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1290000
mmap(0xD1290000, 1101957, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1290000
mmap(0xD13AE000, 30183, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1105920) = 0xD13AE000
mmap(0xD13B6000, 4240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xD13B6000
munmap(0xD139E000, 65536)                       = 0
memcntl(0xD1290000, 123808, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/usr/local/lib/libsocket.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/ssl/lib/libsocket.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/X11R6/lib/libsocket.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/BerkeleyDB.4.7/lib/libsocket.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/lib/libsocket.so.1", 0x08047338)     Err#2 ENOENT
xstat(2, "/usr/local/lib/libnsl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/ssl/lib/libnsl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/X11R6/lib/libnsl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/BerkeleyDB.4.7/lib/libnsl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/lib/libnsl.so.1", 0x08047338)        Err#2 ENOENT
xstat(2, "/usr/local/lib/libdl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/ssl/lib/libdl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/X11R6/lib/libdl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/BerkeleyDB.4.7/lib/libdl.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/lib/libdl.so.1", 0x08047338)         Err#2 ENOENT
xstat(2, "/usr/lib/libdl.so.1", 0x08047338)     = 0
resolvepath("/usr/lib/libdl.so.1", "/usr/lib/libdl.so.1", 1023) = 19
open("/usr/lib/libdl.so.1", O_RDONLY)           = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 73728, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1270000
mmap(0xD1270000, 1532, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1270000
mmap(0xD1281000, 112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 4096) = 0xD1281000
munmap(0xD1271000, 65536)                       = 0
close(3)                                        = 0
xstat(2, "/usr/local/lib/libgcc_s.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/ssl/lib/libgcc_s.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/X11R6/lib/libgcc_s.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/BerkeleyDB.4.7/lib/libgcc_s.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/lib/libgcc_s.so.1", 0x08047338)      Err#2 ENOENT
xstat(2, "/usr/lib/libgcc_s.so.1", 0x08047338)  = 0
resolvepath("/usr/lib/libgcc_s.so.1", "/usr/lib/libgcc_s.so.1", 1023) = 22
open("/usr/lib/libgcc_s.so.1", O_RDONLY)        = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 94208, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1250000
mmap(0xD1250000, 25184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1250000
mmap(0xD1266000, 3372, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 24576) = 0xD1266000
munmap(0xD1257000, 61440)                       = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD1260000
memcntl(0xD1250000, 4984, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libnsl.so.1", 0x08047338)        Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libdoor.so.1", 0x08047338)       Err#2 ENOENT
xstat(2, "/usr/lib/libdoor.so.1", 0x08047338)   = 0


待續........
《解決方案》

Solaris 10 X86下配置Bind 9.6.1后,想用chroot,提示ioctl(DP_POLL)參數錯誤,求救2

resolvepath("/usr/lib/libdoor.so.1", "/usr/lib/libdoor.so.1", 1023) = 21
open("/usr/lib/libdoor.so.1", O_RDONLY)         = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 73728, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1230000
mmap(0xD1230000, 3595, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1230000
mmap(0xD1241000, 328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 4096) = 0xD1241000
munmap(0xD1231000, 65536)                       = 0
memcntl(0xD1230000, 2048, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/lib/libuutil.so.1", 0x08047338)      Err#2 ENOENT
xstat(2, "/usr/lib/libuutil.so.1", 0x08047338)  = 0
resolvepath("/usr/lib/libuutil.so.1", "/usr/lib/libuutil.so.1", 1023) = 22
open("/usr/lib/libuutil.so.1", O_RDONLY)        = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 94208, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1210000
mmap(0xD1210000, 22748, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD1210000
mmap(0xD1226000, 1043, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 24576) = 0xD1226000
munmap(0xD1216000, 65536)                       = 0
memcntl(0xD1210000, 5032, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libgen.so.1", 0x08047338)        Err#2 ENOENT
xstat(2, "/usr/lib/libgen.so.1", 0x08047338)    = 0
resolvepath("/usr/lib/libgen.so.1", "/usr/lib/libgen.so.1", 1023) = 20
open("/usr/lib/libgen.so.1", O_RDONLY)          = 3
mmap(0xD15B0000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD15B0000
mmap(0x00010000, 94208, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD11F0000
mmap(0xD11F0000, 20573, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD11F0000
mmap(0xD1206000, 1655, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 24576) = 0xD1206000
munmap(0xD11F6000, 65536)                       = 0
memcntl(0xD11F0000, 5192, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD1550000
xstat(2, "/lib/libpthread.so.1", 0x08047338)    Err#2 ENOENT
xstat(2, "/lib/libz.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libm.so.2", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libsocket.so.1", 0x08047338)     Err#2 ENOENT
xstat(2, "/lib/libnsl.so.1", 0x08047338)        Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/usr/local/lib/libc.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/usr/local/ssl/lib/libc.so.1", 0x08047338) Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047338)          Err#2 ENOENT
xstat(2, "/lib/libc.so.1", 0x08047118)          Err#2 ENOENT
mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1430000
munmap(0xD15B0000, 32768)                       = 0
getcontext(0x080478C0)
getrlimit(RLIMIT_STACK, 0x080478B8)             = 0
getpid()                                        = 14693
lwp_private(0, 1, 0xD1432A00)                   = 0x000001C3
setustack(0xD1432A60)
sigfillset(0xD13B5DD0)                          = 0
sysconfig(_CONFIG_STACK_PROT)                   = 7
sysi86(SI86FPSTART, 0xD13B6740, 0x0000133F, 0x00001F80) = 0x00000001
fxstat(2, -1, 0x08047BF0)                       Err#9 EBADF
open("/dev/conslog", O_WRONLY)                  = 3
fcntl(3, F_SETFD, 0x00000001)                   = 0
fxstat(2, 3, 0x08047BF0)                        = 0
schedctl()                                      = 0xD15AD000
sigaction(SIGXFSZ, 0x08047BD0, 0x08047C50)      = 0
brk(0x0824DFE8)                                 = 0
brk(0x0824FFE8)                                 = 0
open("/usr/lib/locale/zh/LC_MESSAGES/libdns.cat", O_RDONLY) Err#2 ENOENT
open("/usr/lib/locale/zh/LC_MESSAGES/libisc.cat", O_RDONLY) Err#2 ENOENT
open("/usr/lib/locale/zh/LC_MESSAGES/libdst.cat", O_RDONLY) Err#2 ENOENT
open("/usr/lib/locale/zh/LC_MESSAGES/libisccc.cat", O_RDONLY) Err#2 ENOENT
brk(0x0824FFE8)                                 = 0
brk(0x08253FE8)                                 = 0
brk(0x08253FE8)                                 = 0
brk(0x08255FE8)                                 = 0
getuid()                                        = 0
getpid()                                        = 14693
open("/proc/14693/psinfo", O_RDONLY)            Err#2 ENOENT
mmap(0x00010000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD11D0000
getuid()                                        = 0
getuid()                                        = 0
open64("/var/run/name_service_door", O_RDONLY)  Err#2 ENOENT
open("/etc/nsswitch.conf", O_RDONLY|O_LARGEFILE) = 4
fcntl(4, F_DUPFD, 0x00000100)                   = 256
close(4)                                        = 0
read(256, " #\n #   C o p y r i g h".., 1024)   = 1024
mmap(0x00010000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD11B0000
read(256, " t   p r e t t y   q u i".., 1024)   = 235
read(256, 0xD1432400, 1024)                     = 0
close(256)                                      = 0
xstat(2, "/lib/nss_files.so.1", 0x080472D8)     Err#2 ENOENT
xstat(2, "/usr/lib/nss_files.so.1", 0x080472D8) = 0
resolvepath("/usr/lib/nss_files.so.1", "/usr/lib/nss_files.so.1", 1023) = 23
open("/usr/lib/nss_files.so.1", O_RDONLY)       = 4
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 4, 0) = 0xD15B0000
mmap(0x00010000, 94208, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1190000
mmap(0xD1190000, 24258, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 4, 0) = 0xD1190000
mmap(0xD11A6000, 1188, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 4, 24576) = 0xD11A6000
munmap(0xD1196000, 65536)                       = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD1410000
memcntl(0xD1190000, 5136, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(4)                                        = 0
xstat(2, "/lib/libc.so.1", 0x08047278)          Err#2 ENOENT
xstat(2, "/lib/libsocket.so.1", 0x08047278)     Err#2 ENOENT
xstat(2, "/lib/libnsl.so.1", 0x08047278)        Err#2 ENOENT
munmap(0xD15B0000, 32768)                       = 0
open("/etc/passwd", O_RDONLY|O_LARGEFILE)       = 4
fcntl(4, F_DUPFD, 0x00000100)                   = 256
close(4)                                        = 0
read(256, " n a m e d : x : 1 0 3 4".., 1024)   = 45
close(256)                                      = 0
munmap(0xD1190000, 24258)                       = 0
munmap(0xD11A6000, 1256)                        = 0
getuid()                                        = 0
sysconfig(_CONFIG_NGROUPS)                      = 16
open("/etc/default/nss", O_RDONLY|O_LARGEFILE)  Err#2 ENOENT
getuid()                                        = 0
getuid()                                        = 0
open64("/var/run/name_service_door", O_RDONLY)  Err#2 ENOENT
xstat(2, "/lib/nss_files.so.1", 0x08046EE8)     Err#2 ENOENT
xstat(2, "/usr/lib/nss_files.so.1", 0x08046EE8) = 0
resolvepath("/usr/lib/nss_files.so.1", "/usr/lib/nss_files.so.1", 1023) = 23
open("/usr/lib/nss_files.so.1", O_RDONLY)       = 4
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 4, 0) = 0xD15B0000
mmap(0x00010000, 94208, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD1190000
mmap(0xD1190000, 24258, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 4, 0) = 0xD1190000
mmap(0xD11A6000, 1188, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 4, 24576) = 0xD11A6000
munmap(0xD1196000, 65536)                       = 0
memcntl(0xD1190000, 5136, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(4)                                        = 0
xstat(2, "/lib/libc.so.1", 0x08046E88)          Err#2 ENOENT
xstat(2, "/lib/libsocket.so.1", 0x08046E88)     Err#2 ENOENT
xstat(2, "/lib/libnsl.so.1", 0x08046E88)        Err#2 ENOENT
munmap(0xD15B0000, 32768)                       = 0
brk(0x08255FE8)                                 = 0
brk(0x082D5FE8)                                 = 0
open("/etc/group", O_RDONLY|O_LARGEFILE)        = 4
fcntl(4, F_DUPFD, 0x00000100)                   = 256
close(4)                                        = 0
read(256, " n a m e d : : 1 0 9 :\n", 1024)     = 12
brk(0x082D5FE8)                                 = 0
brk(0x082D7FE8)                                 = 0
read(256, 0x082D4970, 1024)                     = 0
close(256)                                      = 0
setgroups(1, 0x08254910)                        = 0
time()                                          = 1246271204
open("/usr/share/lib/zoneinfo/PRC", O_RDONLY)   Err#2 ENOENT
open("/dev/null", O_RDWR)                       = 4
issetugid()                                     = 0
issetugid()                                     = 0
open("/etc/svc/volatile/repository_door", O_RDONLY) Err#2 ENOENT
sysconfig(_CONFIG_NPROC_ONLN)                   = 2
pipe()                                          = 5
fork1()                                         = 14694
lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF
close(6)                                        = 0
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: found 2 CPUs, using 2 worker threads
Jun 29 10:26:44 Solaris2 named: using up to 4096 sockets
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: starting BIND 9.6.1 -u named
Jun 29 10:26:44 Solaris2 named: built with defaults
Jun 29 10:26:44 Solaris2 named: found 2 CPUs, using 2 worker threads
Jun 29 10:26:44 Solaris2 named: using up to 4096 sockets
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)
Jun 29 10:26:44 Solaris2 named: socket.c:3497: fatal error:
Jun 29 10:26:44 Solaris2 named: ioctl(DP_POLL) failed: Invalid argument
Jun 29 10:26:44 Solaris2 named: exiting (due to fatal error in library)
read(5, 0x08047C1F, 1)          (sleeping...)
read(5, 0x08047C1F, 1)                          = 0
_exit(1)
《解決方案》

# named -t

       -t directory
           Chroot to directory after processing the command line arguments,
           but before reading the configuration file.
                  Warning: This option should be used in conjunction with the
                  -u option, as chrooting a process running as root doesn't
                  enhance security on most systems; the way chroot(2) is
                  defined allows a process with root privileges to escape a
                  chroot jail.
《解決方案》

非常感謝回復,可是運行named -t /dns -u named或者named -t /dns結果還是提示出錯,提示和以前一樣,如下:
# named -t /dns -u named
Jun 30 14:36:20 Solaris named: starting BIND 9.6.1 -t /dns -u named
Jun 30 14:36:20 Solaris named: starting BIND 9.6.1 -t /dns -u named
Jun 30 14:36:20 Solaris named: built with '--with-openssl=yes' '--enable-largefile' 'CC=/usr/local/bin/gcc' 'LDFLAGS=-fPIC -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/X11R6/lib -R/usr/X11R6/lib' 'CPPFLAGS=-I/usr/local/include -I/usr/X11R6/include -I/usr/local/ssl/include -I/usr/local/include/ncurses -I/usr/openwin/include -I/usr/local/cups/include -I/usr/local/rrdtool-1.2.19/include -I/usr/local/mysql/include -I/usr/local/pgsql/include -I/usr/local/Trolltech/Qt-4.5.1/include -I/usr/local/BerkeleyDB.4.7/include' 'CXX=g++'
Jun 30 14:36:20 Solaris named: built with '--with-openssl=yes' '--enable-largefile' 'CC=/usr/local/bin/gcc' 'LDFLAGS=-fPIC -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/X11R6/lib -R/usr/X11R6/lib' 'CPPFLAGS=-I/usr/local/include -I/usr/X11R6/include -I/usr/local/ssl/include -I/usr/local/include/ncurses -I/usr/openwin/include -I/usr/local/cups/include -I/usr/local/rrdtool-1.2.19/include -I/usr/local/mysql/include -I/usr/local/pgsql/include -I/usr/local/Trolltech/Qt-4.5.1/include -I/usr/local/BerkeleyDB.4.7/include' 'CXX=g++'
Jun 30 14:36:20 Solaris named: found 2 CPUs, using 2 worker threads
Jun 30 14:36:20 Solaris named: using up to 4096 sockets
Jun 30 14:36:20 Solaris named: socket.c:3497: fatal error:
Jun 30 14:36:20 Solaris named: ioctl(DP_POLL) failed: Invalid argument
Jun 30 14:36:20 Solaris named: exiting (due to fatal error in library)
Jun 30 14:36:20 Solaris named: socket.c:3497: fatal error:
Jun 30 14:36:20 Solaris named: ioctl(DP_POLL) failed: Invalid argument
Jun 30 14:36:20 Solaris named: exiting (due to fatal error in library)

您知道我錯在哪裡嗎?是不是configure的時候library選擇錯誤了?謝謝!
《解決方案》

我認為LZ一定是少裝了與BIND相關的依賴包。LZ是怎麼安裝的BIND,是用現成的安裝包還是自己編譯的源碼?建議用現成的安裝包來裝問題比較少。
《解決方案》

這裡有最新版本的sunfreeware

ftp.sunfreeware.com/pub/freeware/i386/5.10/
《解決方案》

一方面bind的chroot是通過-t參數進行的,另一方面我看你的報錯信息中有很多ioctl(DP_POLL) failed,你在建chroot環境的時候是否建了poll設備?就是/dev/poll? bind9.6版是需要這個設備才能工作的。
《解決方案》

回復 #5 llzqq 的帖子

謝謝版主,我是自己編譯安裝的。那我試一試安裝包,謝謝!
《解決方案》

回復 #7 cadeerty 的帖子

我在建chroot環境的時候建了/dev/poll。
# ls -la /dns/dev
總數 4
drwxr-x---   2 root     named        512  6月 29日 18:07 .
drwxr-xr-x   7 root     named        512  7月  1日 20:13 ..
crw-r-----   1 root     named     21,  0  6月 29日 18:01 conslog
crw-r-----   1 root     named     21,  5  6月 29日 18:00 log
crw-rw----   1 root     named     13,  2  6月 29日 18:00 null
crw-r-----   1 root     named    138,  0  6月 29日 18:02 poll
crw-r-----   1 root     named    149,  0  6月 29日 18:07 random
crw--w----   1 root     named      0,  0  6月 29日 18:01 syscon
crw-r-----   1 root     named     11, 42  6月 29日 18:00 tcp
crw-r-----   1 root     named     11, 41  6月 29日 18:00 udp
crw-r-----   1 root     named     13, 12  6月 29日 18:00 zero




[火星人 via ] Solaris 10 X86下配置Bind 9.6.1后,想用chroot,提示ioctl(DP_POLL)參數錯誤,求救!已經有395次圍觀

http://www.coctec.com/docs/service/show-post-21898.html