No changes, write.php segmentation fault

Discussion in 'General' started by xenware, Aug 9, 2012.

  1. xenware

    xenware New Member

    Hi

    we had trouble on ISPC 2 site - ran out of the space.

    CentOS 5.8 fully updated x86_64, ispconfig Version: 2.2.35

    Cleaned space, database had errors - repaired via ISPC management - now ok.

    Since than we are seeing problem - vhosts file is written with significant delay and no change is made to running virtual hosts until we restart httpd manualy.

    When I do manualy:

    strace /root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php

    i get folowing error:

    open("/root/ispconfig/libmcrypt/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/root/ispconfig/openssl/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/mysql/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=32605, ...}) = 0
    mmap2(NULL, 32605, PROT_READ, MAP_PRIVATE, 3, 0) = 0x142000
    close(3) = 0
    open("/lib/libnss_files.so.2", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\30\0\0004\0\0\0"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=50848, ...}) = 0
    mmap2(NULL, 45712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x14a000
    mmap2(0x154000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0x154000
    close(3) = 0
    mprotect(0x154000, 4096, PROT_READ) = 0
    munmap(0x142000, 32605) = 0
    open("/etc/services", O_RDONLY) = 3
    fcntl64(3, F_GETFD) = 0
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    fstat64(3, {st_mode=S_IFREG|0644, st_size=362031, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x142000
    read(3, "# /etc/services:\n# $Id: services"..., 4096) = 4096
    read(3, "rotocol\nntp\t\t123/tcp\nntp\t\t123/ud"..., 4096) = 4096
    read(3, "767/udp\nrsync\t\t873/tcp\t\t\t\t# rsyn"..., 4096) = 4096
    read(3, "stmanager\ncvspserver\t2401/tcp\t\t\t"..., 4096) = 4096
    close(3) = 0
    munmap(0x142000, 4096) = 0
    rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTART}, {0x1, [PIPE], SA_RESTART}, 8) = 0
    brk(0x8a8f000) = 0x8a8f000
    brk(0x8ab0000) = 0x8ab0000
    open("/etc/protocols", O_RDONLY) = 3
    fcntl64(3, F_GETFD) = 0
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    fstat64(3, {st_mode=S_IFREG|0644, st_size=6108, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x142000
    read(3, "# /etc/protocols:\n# $Id: protoco"..., 4096) = 4096
    close(3) = 0
    munmap(0x142000, 4096) = 0
    open("/etc/protocols", O_RDONLY) = 3
    fcntl64(3, F_GETFD) = 0
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    fstat64(3, {st_mode=S_IFREG|0644, st_size=6108, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x142000
    read(3, "# /etc/protocols:\n# $Id: protoco"..., 4096) = 4096
    close(3) = 0
    munmap(0x142000, 4096) = 0
    brk(0x8ad1000) = 0x8ad1000
    munmap(0x4cb000, 266240) = 0
    brk(0x8b20000) = 0x8b20000
    open("/root/ispconfig/scripts/writeconf.php", O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=13445, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x142000
    read(3, "<?php\n/*\nCopyright (c) 2005, pro"..., 4096) = 4096
    _llseek(3, 0, [0], SEEK_SET) = 0
    time(NULL) = 1344519106
    fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x143000
    _llseek(0, 0, 0xbfcba288, SEEK_CUR) = -1 ESPIPE (Illegal seek)
    fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x144000
    _llseek(1, 0, 0xbfcba288, SEEK_CUR) = -1 ESPIPE (Illegal seek)
    fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    _llseek(2, 0, 0xbfcba288, SEEK_CUR) = -1 ESPIPE (Illegal seek)
    time(NULL) = 1344519106
    lstat64("/root", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
    lstat64("/root/ispconfig", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat64("/root/ispconfig/scripts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat64("/root/ispconfig/scripts/writeconf.php", {st_mode=S_IFREG|0644, st_size=13445, ...}) = 0
    ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfcb82d8) = -1 ENOTTY (Inappropriate ioctl for device)
    read(3, "<?php\n/*\nCopyright (c) 2005, pro"..., 8192) = 8192
    read(3, "d->db->query(\"UPDATE isp_isp_use"..., 8192) = 5253
    read(3, "", 4096) = 0
    read(3, "", 8192) = 0
    close(3) = 0
    munmap(0x142000, 4096) = 0
    setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
    stat64("/root/ispconfig/.ispconfig_lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    stat64("/root/ispconfig/.ispconfig_lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
    rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    nanosleep({1, 0}, {1, 0}) = 0
    stat64("/root/ispconfig/.ispconfig_lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
    rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    nanosleep({1, 0}, {1, 0}) = 0

    this part is being showed several times

    stat64("/root/ispconfig/.ispconfig_lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
    rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    nanosleep({1, 0}, <unfinished ...>


    until segmentation fault

    Tried manualy remove ispconfig lock file but no change.

    Any idea?

    Peter
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the php error messages that you get on the shellwhen you run the command:

    /root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php
     
  3. xenware

    xenware New Member

    start
    segmentation fault
     
  4. xenware

    xenware New Member

    Actually strace stop at this point:

    stat64("/etc/httpd/conf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    time(NULL) = 1344532406
    open("/etc/httpd/conf/httpd.conf", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
    fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    lseek(5, 0, SEEK_CUR) = 0
    write(5, "#\n# This is the main Apache serv"..., 8192) = 8192
    write(5, "ll\" status\n# information (Extend"..., 8192) = 8192
    write(5, "bleSendfile off\n\n#\n# ErrorLog: T"..., 8192) = 8192
    write(5, "uage he .he\nAddLanguage hr .hr\nA"..., 8192) = 8192
    write(5, "sed virtual hosts so the server "..., 2375) = 2375
    close(5) = 0
    stat64("/root/ispconfig", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    time(NULL) = 1344532406
    lstat64("/root", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
    lstat64("/root/ispconfig", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat64("/root/ispconfig/.old_path_httpd_root", {st_mode=S_IFREG|0644, st_size=8, ...}) = 0
    open("/root/ispconfig/.old_path_httpd_root", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
    fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    lseek(5, 0, SEEK_CUR) = 0
    write(5, "/var/www", 8) = 8
    close(5) = 0
    time(NULL) = 1344532406
    lstat64("/etc", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
    lstat64("/etc/postfix", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat64("/etc/postfix/local-host-names", {st_mode=S_IFREG|0644, st_size=3931, ...}) = 0
    open("/etc/postfix/local-host-names", O_RDONLY) = 5
    fstat64(5, {st_mode=S_IFREG|0644, st_size=3931, ...}) = 0
    lseek(5, 0, SEEK_CUR) = 0
    stat64("/etc/postfix/local-host-names", {st_mode=S_IFREG|0644, st_size=3931, ...}) = 0
    read(5, "################################"..., 8192) = 3931
    close(5) = 0
    time(NULL) = 1344532406
    lstat64("/etc", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
    lstat64("/etc/postfix", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat64("/etc/postfix/virtusertable", {st_mode=S_IFREG|0644, st_size=33812, ...}) = 0
    open("/etc/postfix/virtusertable", O_RDONLY) = 5
    fstat64(5, {st_mode=S_IFREG|0644, st_size=33812, ...}) = 0
    lseek(5, 0, SEEK_CUR) = 0
    stat64("/etc/postfix/virtusertable", {st_mode=S_IFREG|0644, st_size=33812, ...}) = 0
    read(5, "################################"..., 8192) = 8192
    read(5, "[email protected] web31_info\ni"..., 8192) = 8192
    read(5, "www.xxxxx.eu "..., 8192) = 8192
    read(5, ".cz web86_xxxxx\nweb86_j"..., 8192) = 8192
    read(5, "min\[email protected]"..., 8192) = 1044
    close(5) = 0
    poll([{fd=4, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
    write(4, "\r\0\0\0\2db_ispconfig", 17) = 17
    read(4, "\7\0\0\1\0\0\0\2\0\0\0", 16384) = 11
    poll([{fd=4, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
    write(4, "\240\0\0\0\3select dns_isp_dns.doc_id f"..., 164) = 164
    read(4, "\1\0\0\1\1D\0\0\2\3def\fdb_ispconfig\vdns_i"..., 16384) = 156
    brk(0x9c17000) = 0x9c17000
    mmap2(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x939000
    brk(0x9c57000) = 0x9c57000
    brk(0x9c97000) = 0x9c97000
    brk(0x9cd7000) = 0x9cd7000
    mmap2(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xac8000
    brk(0x9d17000) = 0x9d17000
    brk(0x9d57000) = 0x9d57000
    brk(0x9d97000) = 0x9d97000
    brk(0x9dd7000) = 0x9dd7000
    brk(0x9e17000) = 0x9e17000
    mremap(0x939000, 528384, 790528, MREMAP_MAYMOVE) = 0xffa000
    brk(0x9e57000) = 0x9e57000
    brk(0x9e97000) = 0x9e97000
    brk(0x9ed7000) = 0x9ed7000
    brk(0x9f17000) = 0x9f17000
    brk(0x9f57000) = 0x9f57000
    brk(0x9f97000) = 0x9f97000
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---
    +++ killed by SIGSEGV +++
     
  5. xenware

    xenware New Member

    OK problem resolved :)

    Issue happened after centos yum update (in which was bind chroot updated)


    DNS server in chroot was the cause for ispconfig config update not working.

    steps

    chmod 755 /var/named/
    chmod 775 /var/named/chroot/
    chmod 775 /var/named/chroot/var/
    chmod 775 /var/named/chroot/var/named/
    chmod 775 /var/named/chroot/var/run/
    chmod 777 /var/named/chroot/var/run/named/
    cd /var/named/chroot/var/named/
    ln -s ../../ chroot

    in ispc - management - server - dns

    zonefiles dir -> change the value from /etc/bind to var/named/chroot/var/named

    restart http + dns services in management or manualy

    done
     
  6. createch

    createch ISPConfig Developer ISPConfig Developer

    In our company, all the production servers (including those with ISPConfig installed) will get yum update disabled.

    Anyway thanks for sharing this.
     

Share This Page