卖卖123 2021-03-27 12:00 采纳率: 0%
浏览 35
已结题

lighttpd1.4.48上传文件进程异常退出

lihgttpd.conf内容如下:

# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules              = (
#                               "mod_rewrite",
#                               "mod_redirect",
#                               "mod_alias",
                                "mod_access",
#                               "mod_cml",
#                               "mod_trigger_b4_dl",
                               "mod_auth",
#                               "mod_status",
#                               "mod_setenv",
                               "mod_fastcgi",
#                               "mod_proxy",
#                               "mod_simple_vhost",
#                               "mod_evhost",
#                               "mod_userdir",
                               "mod_cgi",
#                               "mod_compress",
#                               "mod_ssi",
#                               "mod_usertrack",
#                               "mod_expire",
#                               "mod_secdownload",
#                               "mod_rrdtool",
                                "mod_accesslog",
                                                                "mod_openssl")

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options  
server.document-root        = "/usr/web"
server.use-ipv6 = "disable"
## where to send error-messages to
server.errorlog             = "/usr/log/error.log"

# files to check for if .../ is requested
index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm" )

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X

# mimetype mapping
mimetype.assign             = (
  ".pdf"          =>      "application/pdf",
  ".sig"          =>      "application/pgp-signature",
  ".spl"          =>      "application/futuresplash",
  ".class"        =>      "application/octet-stream",
  ".ps"           =>      "application/postscript",
  ".torrent"      =>      "application/x-bittorrent",
  ".dvi"          =>      "application/x-dvi",
  ".gz"           =>      "application/x-gzip",
  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "application/ogg",
  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jar"          =>      "application/x-java-archive",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".xbm"          =>      "image/x-xbitmap",
  ".xpm"          =>      "image/x-xpixmap",
  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv",
  ".bz2"          =>      "application/x-bzip",
  ".tbz"          =>      "application/x-bzip-compressed-tar",
  ".tar.bz2"      =>      "application/x-bzip-compressed-tar",
  # default mime type
  ""              =>      "application/octet-stream",
 )

# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr        = "enable"


## send a different Server: header
## be nice and keep it at lighttpd
# server.tag                 = "lighttpd"

#### accesslog module
accesslog.filename          = "/usr/log/access.log"

## deny access the file-extensions
#
# ~    is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
#      of the document-root
url.access-deny             = ( "~", ".inc" )

#$HTTP["url"] =~ "\.pdf$" {
#  server.range-requests = "disable"
#}

##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port                = 443

## bind to localhost (default: all interfaces)
#server.bind                = "127.0.0.1"

## error-handler for status 404
#server.error-handler-404   = "/error-handler.html"
#server.error-handler-404   = "/error-handler.php"

## to help the rc.scripts
#server.pid-file            = "/var/run/lighttpd.pid"


###### virtual hosts
##
##  If you want name-based virtual hosting add the next three settings and load
##  mod_simple_vhost
##
## document-root =
##   virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
##   virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root   = "/srv/www/vhosts/"
#simple-vhost.default-host  = "www.example.org"
#simple-vhost.document-root = "/htdocs/"


##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix    = "/usr/share/lighttpd/errors/status-"
#server.errorfile-prefix    = "/srv/www/errors/status-"

## virtual directory listings
#dir-listing.activate       = "enable"
## select encoding for directory listings
#dir-listing.encoding        = "utf-8"

## enable debugging
#debug.log-request-header   = "enable"
#debug.log-response-header  = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found   = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot              = "/"

## change uid to <uid> (default: don't care)
#server.username            = "wwwrun"

## change uid to <uid> (default: don't care)
#server.groupname           = "wwwrun"

#### compress module
#compress.cache-dir         = "/var/cache/lighttpd/compress/"
#compress.filetype          = ("text/plain", "text/html")

#### proxy module
## read proxy.txt for more info
#proxy.server               = ( ".php" =>
#                               ( "localhost" =>
#                                 (
#                                   "host" => "192.168.0.101",
#                                   "port" => 80
#                                 )
#                               )
#                             )
#### CGI module
cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
                               ".cgi" => "" )
#

#### SSL engine
ssl.engine                 = "enable"
ssl.honor-cipher-order = "enable" 

ssl.use-sslv2 = "disable"  
ssl.use-sslv3 = "disable"  
ssl.use-compression = "disable"  
#ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES128+EECDH:AES128+EDH"  
#CVE-2011-3389  
#ssl.cipher-list = "ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM"  
#ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"  
ssl.cipher-list = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA "
#ssl.honor-cipher-order = "enable"  
ssl.disable-client-renegotiation = "enable"

ssl.pemfile                = "/usr/lighttpd/server.pem"
ssl.ca-file                = "/usr/lighttpd/server.crt"
ssl.dh-file                = "/usr/lighttpd/dhparams.pem"



#### status module
#status.status-url          = "/server-status"
#status.config-url          = "/server-config"

#### auth module
## read authentication.txt for more info
#auth.backend               = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
#auth.backend.ldap.filter   = "(uid=$)"

#auth.require               = ( "/server-status" =>
#                               (
#                                 "method"  => "digest",
#                                 "realm"   => "download archiv",
#                                 "require" => "user=jan"
#                               ),
#                               "/server-config" =>
#                               (
#                                 "method"  => "digest",
#                                 "realm"   => "download archiv",
#                                 "require" => "valid-user"
#                               )
#                             )

#### url handling modules (rewrite, redirect, access)
#url.rewrite                = ( "^/$"             => "/server-status" )
#url.redirect               = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www\.(.*)" {
#  url.redirect            = ( "^/(.*)" => "http://%1/$1" )
#}

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern        = "/srv/www/vhosts/%3/htdocs/"

#### expire module
#expire.url                 = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")

#### ssi
#ssi.extension              = ( ".shtml" )

#### rrdtool
#rrdtool.binary             = "/usr/bin/rrdtool"
#rrdtool.db-name            = "/var/lib/lighttpd/lighttpd.rrd"

#### setenv
#setenv.add-request-header  = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )

## for mod_trigger_b4_dl
# trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/"
# trigger-before-download.download-url = "^/download/"
# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
# trigger-before-download.trigger-timeout = 10

## for mod_cml
## don't forget to add index.cml to server.indexfiles
# cml.extension               = ".cml"
# cml.memcache-hosts          = ( "127.0.0.1:11211" )

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"

#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1
#### file upload
server.upload-dirs=( "/media/ram/" )

WEB上点击版本上传,然后后端是C语言编译好的后缀为.cgi的可执行文件,异常退出的情况就是,在/media/ram目录下会产生许多的大小约1M的以lighttpd-upload-开头的临时文件,然后程序就异常退出了。最终保存上传版本文件的目录是/media/ram/image.版本文件大小为100M

这个程序是利用powerpc-linux-gun-gcc交叉编译出来放在开发板上面跑的,程序异常退出之后,在虚拟机上用powerpc-linux-gun-gdb调试,信息如下:

GNU gdb (Sourcery G++ Lite 2010.09-55) 7.2.50.20100908-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=powerpc-linux-gnu".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>...
Reading symbols from /home/wind/snos_1_0_0/project/nanocell_dis_insp/platform/fsl/lighttpd_core/lighttpd...done.

warning: exec file is newer than core file.
[New LWP 4143]

warning: Can't read pathname for load map: 输入/输出错误.

warning: `/usr/lib/libssl.so.1.1': Shared library architecture unknown is not compatible with target architecture powerpc:common.

warning: .dynamic section for "/usr/lib/libssl.so.1.1" is not at the expected address (wrong library or version mismatch?)

warning: Could not load shared library symbols for 6 libraries, e.g. /lib/libdl.so.2.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /usr/lib/libcrypto.so.1.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcrypto.so.1.1
Reading symbols from /usr/lighttpd/lib//mod_indexfile.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_indexfile.so
Reading symbols from /usr/lighttpd/lib//mod_access.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_access.so
Reading symbols from /usr/lighttpd/lib//mod_auth.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_auth.so
Reading symbols from /usr/lighttpd/lib//mod_fastcgi.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_fastcgi.so
Reading symbols from /usr/lighttpd/lib//mod_cgi.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_cgi.so
Reading symbols from /usr/lighttpd/lib//mod_accesslog.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_accesslog.so
Reading symbols from /usr/lighttpd/lib//mod_openssl.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_openssl.so
Reading symbols from /usr/lib/libssl.so.1.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libssl.so.1.1
Reading symbols from /usr/lighttpd/lib//mod_dirlisting.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_dirlisting.so
Reading symbols from /usr/lighttpd/lib//mod_staticfile.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_staticfile.so
Reading symbols from /usr/lighttpd/lib//mod_authn_file.so...done.
Loaded symbols for /usr/lighttpd/lib//mod_authn_file.so

warning: Unable to find dynamic linker.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

warning: Can't read pathname for load map: 输入/输出错误.
Core was generated by `/usr/bin/lighttpd -f /usr/lighttpd/config/lighttpd.conf -m /usr/lighttpd/lib/'.
Program terminated with signal 11, Segmentation fault.
#0  0x0fc9bdd4 in ?? ()
(gdb) bt
#0  0x0fc9bdd4 in ?? ()
#1  0x10016fcc in log_buffer_append_printf (out=0x1004f220, fmt=<value optimized out>, ap=0xbfed3b68) at log.c:78
#2  0x10017684 in log_error_write (srv=0x1004f008, filename=<value optimized out>, line=<value optimized out>, fmt=0xfb26708 "ss") at log.c:186
#3  0x0fb251cc in cgi_create_env (srv=0x1004f008, con=0x10089830, p_d=0x1005c9a0) at mod_cgi.c:785
#4  mod_cgi_handle_subrequest (srv=0x1004f008, con=0x10089830, p_d=0x1005c9a0) at mod_cgi.c:1027
#5  0x100231e0 in plugins_call_handle_subrequest (srv=0x1004f008, con=0x10089830) at plugin.c:338
#6  0x10009554 in http_response_prepare (srv=0x1004f008, con=0x10089830) at response.c:686
#7  0x1000c148 in connection_state_machine (srv=0x1004f008, con=0x10089830) at connections.c:1169
#8  0x10007044 in server_main (srv=0x1004f008, argc=<value optimized out>, argv=<value optimized out>) at server.c:1991
#9  0x10008c74 in main (argc=5, argv=0xbfed42f4) at server.c:2045

多次调试找不出问题在哪儿,有哪位大神能指点迷津的

  • 写回答

1条回答 默认 最新

  • 歇歇 2021-03-27 14:45
    关注

    无法找到动态链接器。

    GDB将无法调试共享库初始化器

    并跟踪显式加载的动态代码。

    重新安装一个

    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效