gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gluster-devel] bug in mod_glusterfs for lighty 1.5


From: s . dinev
Subject: [Gluster-devel] bug in mod_glusterfs for lighty 1.5
Date: Mon, 13 Jul 2009 13:15:43 +0300
User-agent: Mail.BG Webmail H3 (4.1.4)

Hello!

We want to use mod_glusterfs, but it has bugs. We use glusterfs on our production servers (version glusterfs-1.4.0pre5 ). Our web server is lighttpd 1.5 rev. 1992. 

We decided to test mod_glusterfs, but we discovered that it killed lighty (SEGFAULT). With valgrind I discovered that the problem is near line 1453 of mod_glusterfs.c. I looked it and I decided to change the code:

FROM:
URIHANDLER_FUNC(mod_glusterfs_response_done) {
  plugin_data *p = p_d;
  UNUSED (srv);
  mod_glusterfs_ctx_t *ctx = con->plugin_ctx[p->id];

  con->plugin_ctx[p->id] = NULL;
  if (ctx) {
  if (ctx->glusterfs_path) {
  free (ctx->glusterfs_path);
  }
  }

  free (ctx);
  return HANDLER_GO_ON;
}

TO:
URIHANDLER_FUNC(mod_glusterfs_response_done) {
  plugin_data *p = p_d;
  UNUSED (srv);
  mod_glusterfs_ctx_t *ctx = con->plugin_ctx[p->id];

  if (ctx) {
  if (ctx->buf) {
  free (ctx->buf);
  ctx->buf = NULL;
  }
  if (ctx->glusterfs_path) {
// free (ctx->glusterfs_path);
  buffer_free (ctx->glusterfs_path);
  ctx->glusterfs_path = NULL;
  }
  }
  con->plugin_ctx[p->id] = NULL;
  free (ctx);

  return HANDLER_GO_ON;
}

Now It works, but when I stop downloading proces lighty kills itself (server.c.847: (trace) [note] graceful shutdown started by UID=0, PID=0). Now I don`t know what to do.

I updated glusterfs to the latest version, but when I started lighty, it showed:

## lighttpd error glusterfs version 2.0.1 and above
Starting web server: lighttpd2009-07-08 12:54:55: (plugin.c.266) dlopen() failed for: /usr/lib/lighttpd/mod_glusterfs.so /usr/lib/lighttpd/mod_glusterfs.so: undefined symbol: glusterfs_lookup_async
2009-07-08 12:54:55: (server.c.1185) loading plugins finally failed

It looks like this method doesn`t exist any more.

I will be very thankful if you fix these bugs and people can use mod_glusterfs freely. I hope that you send me some information about the problems I described above.


Other bug:
# compile error - SEGFAULT
mod_glusterfs.c:830:26: warning: ISO C99 requires rest arguments to be used
mod_glusterfs.c: In function ‘http_response_parse_range’:
mod_glusterfs.c:830: error: expected _expression_ before ‘)’ token
mod_glusterfs.c:830: warning: too many arguments for format
mod_glusterfs.c:830: error: expected _expression_ before ‘,’ token
make[4]: *** [mod_glusterfs_la-mod_glusterfs.lo] Error 1

# fix
SEGFAULT("got HANDLER_ERROR from a plugin: %s", "glusterfs");

--
Стефан Динев
mail.bG
BG-1517 Sofia, P.O. Box 17
Phone: +359 [2] 9451006

reply via email to

[Prev in Thread] Current Thread [Next in Thread]