search for: free_connection

Displaying 20 results from an estimated 71 matches for "free_connection".

2020 Mar 19
2
Re: Anyone seen build hangs (esp armv7, s390x) in Fedora?
...0x7fabbfcf8700 (LWP 3955793)): #0 0x00007fabc069eab7 in __pthread_clockjoin_ex () from /lib64/libpthread.so.0 #1 0x00007fabc090af2b in nbdplug_close_handle (h=0x5584020e09b0) at nbd.c:538 #2 0x00005583f90caee0 in backend_close (b=<optimized out>) at backend.c:247 #3 0x00005583f90cdbf1 in free_connection (conn=0x5584020df890) at connections.c:359 #4 handle_single_connection (sockin=<optimized out>, sockout=<optimized out>) at connections.c:230 #5 0x00005583f90d63e8 in start_thread (datav=0x5584020bf1b0) at sockets.c:356 #6 0x00007fabc069d472 in start_thread () from /lib64/libpthread....
2020 Oct 12
2
Lookup sid with libsmbclient (invoked from c# on mono)
...// establish connection and return handle } const char* name_to_sid(void *con, const char *name) { // use con to resolve and return sid } const char* sid_to_name(void *con, const char *sid) { // use con to resolve and return name } void free_connection(void *con) { // release con handle } This wrapper would link against the same libs as rpcclient binary and would compile to librpcwrapper.so. From C you can #include all the struct definitions you need or copy them from the source code. Then from C# you just load librpcwrapper.so...
2017 Nov 17
8
[RFC nbdkit PATCH 0/6] Enable full parallel request handling
I want to make my nbd forwarding plugin fully parallel - but to do that, I first need to make nbdkit itself fully parallel ;) With this series, I was finally able to demonstrate out-of-order responses when using qemu-io (which is great at sending back-to-back requests prior to waiting for responses) coupled with the nbd file plugin (which has a great feature of rdelay and wdelay, to make it
2017 Nov 15
1
[nbdkit PATCH] connections: Extract common export flag computation code
...dhat.com> --- src/connections.c | 120 +++++++++++++++++++++--------------------------------- 1 file changed, 47 insertions(+), 73 deletions(-) diff --git a/src/connections.c b/src/connections.c index 8dc1925..f9edea7 100644 --- a/src/connections.c +++ b/src/connections.c @@ -237,13 +237,57 @@ free_connection (struct connection *conn) } static int +compute_eflags (struct connection *conn, uint16_t *flags) +{ + uint16_t eflags = NBD_FLAG_HAS_FLAGS; + int fl; + + fl = plugin_can_write (conn); + if (fl == -1) + return -1; + if (readonly || !fl) { + eflags |= NBD_FLAG_READ_ONLY; + conn->...
2018 Apr 12
3
[PATCH nbdkit 0/2] connections: Protect open and close callbacks with the request lock.
I'm fairly sure that these bugs which appear in the Python plugin: https://bugzilla.redhat.com/show_bug.cgi?id=1566516 https://bugzilla.redhat.com/show_bug.cgi?id=1566522 are really bugs in the SERIALIZE_ALL_REQUESTS thread model. See the first patch for the full explanation. The second patch is a fix for a race condition which is probably nudged into being by the first patch. Now this
2016 Sep 26
0
Re: Memory corruption when testing nbdkit python plugin with nbd-tester-client?
...07ffff7033577 in PyEval_CallObjectWithKeywords () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 > #9 0x00007ffff73f0af0 in py_close (handle=0x625338) at python.c:234 > #10 0x0000000000405803 in plugin_close (conn=conn@entry=0x7fffe8000910) at plugins.c:377 > #11 0x00000000004037ec in free_connection (conn=0x7fffe8000910) at connections.c:147 > #12 0x0000000000404476 in _handle_single_connection (sockout=<optimized out>, sockin=<optimized out>) at connections.c:99 > #13 handle_single_connection (sockin=<optimized out>, sockout=<optimized out>) at connections.c:109...
2013 Mar 07
3
[PATCH 0/3] protocol: Abstract out socket operations.
I've been taking a long hard look at the protocol layer. It has evolved over a long time without any particular direction, and the result is, to say the least, not very organized. These patches take a first step at cleaning up the mess by abstracting out socket operations from the rest of the code. The purpose of this is to allow us to slot in a different connection layer under the
2016 Sep 26
2
Re: Memory corruption when testing nbdkit python plugin with nbd-tester-client?
...o.1.0 #8 0x00007ffff7033577 in PyEval_CallObjectWithKeywords () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 #9 0x00007ffff73f0af0 in py_close (handle=0x625338) at python.c:234 #10 0x0000000000405803 in plugin_close (conn=conn@entry=0x7fffe8000910) at plugins.c:377 #11 0x00000000004037ec in free_connection (conn=0x7fffe8000910) at connections.c:147 #12 0x0000000000404476 in _handle_single_connection (sockout=<optimized out>, sockin=<optimized out>) at connections.c:99 #13 handle_single_connection (sockin=<optimized out>, sockout=<optimized out>) at connections.c:109 #14 0x0000...
2019 Oct 03
0
[nbdkit PATCH 3/4] server: Close backends if a filter's .open fails
...NULL); + if (b->i) /* Do not strand backend if this layer failed */ + backend_close (b->next, conn); + } return r; } diff --git a/server/connections.c b/server/connections.c index 27cf202b..df5e09af 100644 --- a/server/connections.c +++ b/server/connections.c @@ -360,7 +360,7 @@ free_connection (struct connection *conn) * thread will be in the process of unloading it. The plugin.unload * callback should always be called. */ - if (!quit && connection_get_handle (conn, 0)) { + if (!quit) { lock_request (conn); backend_close (backend, conn); unlock_reque...
2017 Sep 28
0
Re: nbdkit 1.1.15 -- test-python failure
...0x0000000000406715 in prologue (type=0x409928 "debug") at errors.c:54 #3 0x000000000040685d in nbdkit_debug (fs=fs@entry=0x40ace6 "close") at errors.c:91 #4 0x00000000004077d9 in plugin_close (conn=conn@entry=0x7f679c000910) at plugins.c:386 #5 0x0000000000404de3 in free_connection (conn=0x7f679c000910) at connections.c:228 #6 0x00000000004059fd in _handle_single_connection (sockout=<optimized out>, sockin=<optimized out>) at connections.c:179 #7 handle_single_connection (sockin=<optimized out>, sockout=<optimized out>) at connections.c:...
2017 Nov 14
0
[PATCH 2/3] Avoid race conditions when nbdkit exits.
...ose callback. --- src/connections.c | 10 ++++++++-- src/plugins.c | 20 +++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/connections.c b/src/connections.c index 46609f0..0cbf54a 100644 --- a/src/connections.c +++ b/src/connections.c @@ -224,8 +224,14 @@ free_connection (struct connection *conn) pthread_mutex_destroy (&conn->request_lock); - if (conn->handle) - plugin_close (conn); + /* Don't call the plugin again if quit has been set because the main + * thread will be in the process of unloading it. The plugin.unload + * callback s...
2020 Oct 12
0
Lookup sid with libsmbclient (invoked from c# on mono)
..., const char *name) > > { > > // use con to resolve and return sid > > } > > > > const char* sid_to_name(void *con, const char *sid) > > { > > // use con to resolve and return name > > } > > > > void free_connection(void *con) > > { > > // release con handle > > } > > > > This wrapper would link against the same libs as rpcclient binary and > > would compile to librpcwrapper.so. From C you can #include all the > > struct definitions you need or copy the...
2019 Jun 07
4
[nbdkit PATCH v2 0/2] Reduce network overhead with MSG_MORE/corking
This time around, the numbers are indeed looking better than in v1; and I like the interface better. Eric Blake (2): server: Prefer send() over write() server: Group related transmission send()s server/internal.h | 7 +++- server/connections.c | 51 +++++++++++++++++++++++++--- server/crypto.c | 11 ++++--
2017 Nov 17
0
[nbdkit PATCH 3/6] connections: Add read/write lock over client I/O
...>sockin = sockin; conn->sockout = sockout; pthread_mutex_init (&conn->request_lock, NULL); + pthread_mutex_init (&conn->read_lock, NULL); + pthread_mutex_init (&conn->write_lock, NULL); conn->recv = raw_recv; conn->send = raw_send; @@ -223,6 +227,8 @@ free_connection (struct connection *conn) conn->close (conn); pthread_mutex_destroy (&conn->request_lock); + pthread_mutex_destroy (&conn->read_lock); + pthread_mutex_destroy (&conn->write_lock); /* Don't call the plugin again if quit has been set because the main * thr...
2017 Nov 20
10
[nbdkit PATCH v2 0/8] Support parallel transactions within single connection
I've posted some of these patches or ideas before; but now I'm confident enough with the series that it should be ready to push; at any rate, I can now run test-socket-activation in a tight loop without triggering any crashes or hangs. With this in place, I'm going back to work on making the nbd forwarder wort with the parallel thread model. Eric Blake (8): sockets: Use
2019 Jun 06
0
[nbdkit PATCH 1/2] server: Add support for corking
.....9b0b75c 100644 --- a/server/connections.c +++ b/server/connections.c @@ -38,6 +38,8 @@ #include <inttypes.h> #include <string.h> #include <unistd.h> +#include <netinet/ip.h> +#include <netinet/tcp.h> #include "internal.h" @@ -51,6 +53,7 @@ static void free_connection (struct connection *conn); /* Don't call these raw socket functions directly. Use conn->recv etc. */ static int raw_recv (struct connection *, void *buf, size_t len); static int raw_send (struct connection *, const void *buf, size_t len); +static int raw_cork (struct connection *conn, bo...
2019 Aug 27
0
[nbdkit PATCH] server: Enforce sane stdin/out/err
...readonly; extern const char *run; +extern bool listen_stdin; extern const char *selinux_label; extern int threads; extern int tls; diff --git a/server/connections.c b/server/connections.c index c173df8d..0184afea 100644 --- a/server/connections.c +++ b/server/connections.c @@ -366,6 +366,18 @@ free_connection (struct connection *conn) threadlocal_set_conn (NULL); conn->close (conn); + if (listen_stdin) { + int fd; + + /* Restore something to stdin/out so the rest of our code can + * continue to assume that all new fds will be above stderr. + * Swap directions to get EBADF on imp...
2016 Jan 11
1
[PATCH] Add support for newstyle NBD protocol (RHBZ#1297100).
Experimental and only very lightly tested so far. Rich.
2020 Oct 12
2
Lookup sid with libsmbclient (invoked from c# on mono)
Rowland penny via samba <samba at lists.samba.org> writes: > I have no idea just what you are hoping to achieve, but it is seemingly > possible without authentication as 'wbinfo -n ACCOUNT_NAME' returns the > accounts SID. So try looking at the wbinfo code. wbinfo is talking to winbind which itself is talking to the AD. In this scenario the client previously joined
2019 Sep 10
0
[PATCH nbdkit] server: Add nbdkit_export_name() to allow export name to be read.
...the server is using the oldstyle protocol the client does not send +an export name. + +=back + =head1 CALLBACKS =head2 C<.name> diff --git a/server/connections.c b/server/connections.c index b582764..a1fea54 100644 --- a/server/connections.c +++ b/server/connections.c @@ -385,6 +385,7 @@ free_connection (struct connection *conn) pthread_mutex_destroy (&conn->status_lock); free (conn->handles); + free (conn->exportname); free (conn); } diff --git a/server/internal.h b/server/internal.h index 9314e8f..3bfc1a7 100644 --- a/server/internal.h +++ b/server/internal.h @@ -180,...