Displaying 20 results from an estimated 21 matches for "_sock".
Did you mean:
sock
2014 May 15
2
Re: guestfsd crashes when the handle is closed
Hello,
This is the ouotput for fedora guest.
==========================================
*#0 0xb73b7040 in exit () from /lib/libc.so.6*
No symbol table info available.
*#1 0xb76fb3a8 in main_loop (_sock=_sock@entry=3) at proto.c:112*
xdr = {x_op = XDR_DECODE, x_ops = 0xb753db00 <xdrmem_ops>,
x_public = 0x0, x_private = 0xbba929d8 ".0", x_base = 0xbba929b0
"",
x_handy = 0}
buf = <optimized out>
lenbuf = "\000\000\000(&...
2017 Oct 12
1
[PATCH v2] daemon: proto: Make the guestfsd main loop messages consistent and useful.
...bytes
guestfsd: leave: touch (0x3) took 0.00 secs
---
daemon/proto.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/daemon/proto.c b/daemon/proto.c
index 14f7efe94..9abc46962 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -96,11 +96,6 @@ main_loop (int _sock)
xdr_u_int (&xdr, &len);
xdr_destroy (&xdr);
- if (verbose)
- fprintf (stderr,
- "guestfsd: main_loop: new request, len 0x%" PRIx32 "\n",
- len);
-
/* Cancellation sent from the library and received after the
* previous re...
2009 Sep 17
1
[PATCH] Fix code which looked for leaked FDs between each command.
...c0e3927..c22bbee 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -29,6 +29,8 @@
#include <rpc/types.h>
#include <rpc/xdr.h>
+#include "ignore-value.h"
+
#include "daemon.h"
#include "../src/guestfs_protocol.h"
@@ -53,13 +55,11 @@ main_loop (int _sock)
sock = _sock;
for (;;) {
-#if 0
/* Most common errors are leaked memory and leaked file descriptors,
* so run this between each command:
*/
- if (verbose)
- system ("ls -l /proc/self/fd");
-#endif
+ if (verbose && 0)
+ ignore_value (system...
2014 Oct 01
0
Useful tip: Run guestfsd under gdb and print stack trace on exit
...debug_segv (subcmd=0x4687050 "segv", argc=0, argv=0x4687070) at debug.c:223
#1 0x000000000042e083 in debug_stub (xdr_in=<optimized out>) at stubs.c:2557
#2 0x0000000000448d5d in dispatch_incoming_message (xdr_in=0x7fffffffe8d0) at stubs.c:15819
#3 0x0000000000428a91 in main_loop (_sock=73953360, _sock at entry=3) at proto.c:192
#4 0x000000000040564d in main (argc=<optimized out>, argv=<optimized out>) at guestfsd.c:344
Rebooting.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: htt...
2017 Oct 09
2
[PATCH] daemon: proto: Remove pervasive but useless debugging messages.
If you spend your time looking at libguestfs debugging output you'll
see many messages from the daemon main loop like this:
guestfsd: main_loop: new request, len 0x54
guestfsd: main_loop: proc 278 (mkfs) took 0.02 seconds
I don't think these messages really bring much value. This commit
removes them entirely.
An alternative might be to change them to make them shorter and/or
less
2014 May 15
2
Re: guestfsd crashes when the handle is closed
Hello,
So in ubuntu1204 guest This is what i got :
*(gdb)* bt full
* #0* 0x005a9fc0 in exit () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
* #1* 0x0805f7dd in ?? ()
No symbol table info available.
* #2* 0x0804aedf in ?? ()
No symbol table info available.
*#3* 0x005904d3 in __libc_start_main () from
/lib/i386-linux-gnu/libc.so.6
No symbol
2009 Sep 17
1
[PATCH] 'len' should be an unsigned 32 bit int.
...;unsigned len'
happens to be 32 bit on all platforms we support.
---
daemon/proto.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon/proto.c b/daemon/proto.c
index d935ded..431f219 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -45,7 +45,7 @@ main_loop (int _sock)
XDR xdr;
char *buf;
char lenbuf[4];
- unsigned len;
+ uint32_t len;
struct guestfs_message_header hdr;
struct timeval start_t, end_t;
int64_t start_us, end_us, elapsed_us;
--
1.6.2.5
2009 Sep 17
2
[PATCH] Fix verbose packet dumping functions.
...fixes the obvious problems.
---
daemon/proto.c | 4 ++--
src/guestfs.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/daemon/proto.c b/daemon/proto.c
index 431f219..817a995 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -83,10 +83,10 @@ main_loop (int _sock)
#if 0
if (verbose) {
- int i, j;
+ size_t i, j;
for (i = 0; i < len; i += 16) {
- printf ("%04x: ", i);
+ printf ("%04zx: ", i);
for (j = i; j < MIN (i+16, len); ++j)
printf ("%02x ", (unsigned char) b...
2009 Nov 25
1
[PATCH] daemon/Win32: Use xdr_u_int for PortableXDR compatibility.
...xdr_uint32_t (&xdr, &len);
+ xdr_u_int (&xdr, &len);
if (xwrite (sock, lenbuf, sizeof lenbuf) == -1)
exit (EXIT_FAILURE);
diff --git a/daemon/proto.c b/daemon/proto.c
index 4106d92..2231037 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -67,7 +67,7 @@ main_loop (int _sock)
exit (EXIT_FAILURE);
xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE);
- xdr_uint32_t (&xdr, &len);
+ xdr_u_int (&xdr, &len);
xdr_destroy (&xdr);
if (len > GUESTFS_MESSAGE_MAX) {
@@ -233,7 +233,7 @@ send_error (const char *msg)
xdr_destroy (...
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
.../* Enter the main loop, reading and performing actions. */
main_loop (sock);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* Read /proc/cmdline. */
diff --git a/daemon/proto.c b/daemon/proto.c
index a0d3736..284037d 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -63,7 +63,7 @@ main_loop (int _sock)
/* Read the length word. */
if (xread (sock, lenbuf, 4) == -1)
- exit (1);
+ exit (EXIT_FAILURE);
xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE);
xdr_uint32_t (&xdr, &len);
@@ -72,7 +72,7 @@ main_loop (int _sock)
if (len > GUESTFS_MESSAGE_MAX) {...
2023 Mar 10
0
[PATCH net-next v3 0/3] vsock: add support for sockmap
...bpf: Return bool instead of int of 0 or 1
> - vsock/bpf: Wrap macro args __sk/__psock in parens
> - vsock/bpf: Place comment trailer */ on separate line
>
> Changes in v2:
> - vsock/bpf: rename vsock_dgram_* -> vsock_*
> - vsock/bpf: change sk_psock_{get,put} and {lock,release}_sock() order
> to minimize slock hold time
> - vsock/bpf: use "new style" wait
> - vsock/bpf: fix bug in wait log
> - vsock/bpf: add check that recvmsg sk_type is one dgram, seqpacket, or
> stream. Return error if not one of the three.
> - virtio/vsock: comment __skb_rec...
2007 Oct 30
1
xen xm list: DomUs blocked
...rpclib2.py", line 66, in
do_POST
self.send_response(200)
File "BaseHTTPServer.py", line 368, in send_response
(self.protocol_version, code, message))
File "socket.py", line 262, in write
self.flush()
File "socket.py", line 249, in flush
self._sock.sendall(buffer)
error: (32, ''Broken pipe'')
Here is a tail excerpt from /var/log/xen/xend.log:
[2007-10-30 11:57:01 xend.XendDomainInfo 16192] DEBUG (XendDomainInfo:190)
XendDomainInfo.create([''vm'', [''name'', ''work''], ['&...
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch:
https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html
This adds OCaml and Perl bindings (both tested), support for
progress bars in virt-resize, and adds progress notifications
to a number of the simpler commands.
Still to do is to add progress messages to more commands. There
are still a few commands which would be
2008 Jun 11
1
xen migrate never ends
...onse(200)
File "/usr/lib/python2.5/BaseHTTPServer.py", line 368, in send_response
(self.protocol_version, code, message))
File "/usr/lib/python2.5/socket.py", line 262, in write
self.flush()
File "/usr/lib/python2.5/socket.py", line 249, in flush
self._sock.sendall(buffer)
error: (32, ''Broken pipe'')
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
2006 Dec 02
3
Bug#401249: xen-utils-common: xenbr0 not being created
...lib2.py", line 66, in do_POST
self.send_response(200)
File "BaseHTTPServer.py", line 367, in send_response
self.wfile.write("%s %d %s\r\n" %
File "socket.py", line 248, in write
self.flush()
File "socket.py", line 235, in flush
self._sock.sendall(buffer)
error: (32, 'Broken pipe')
/var/log/xen/xend.log:
[2006-12-02 02:26:50 xend 2941] INFO (__init__:1072) Xend Daemon started
[2006-12-02 02:26:50 xend 2941] INFO (__init__:1072) Xend changeset: Thu Sep 21 17:56:14 2006 +0100 .
[2006-12-02 02:26:50 xend 2941] ERROR (__init__...
2009 Sep 24
1
enabling more syntax-checks
...h>
#include <errno.h>
-#include <ctype.h>
#include <sys/param.h> /* defines MIN */
#include <rpc/types.h>
#include <rpc/xdr.h>
+#include "c-ctype.h"
#include "ignore-value.h"
#include "daemon.h"
@@ -96,7 +96,7 @@ main_loop (int _sock)
printf (" ");
printf ("|");
for (j = i; j < MIN (i+16, len); ++j)
- if (isprint (buf[j]))
+ if (c_isprint (buf[j]))
printf ("%c", buf[j]);
else
printf (".");
diff --git...
2015 Jul 02
0
[PATCH] Fix various -Wformat problems.
.../
+ /* NB: hex */
+ snprintf (idbyte_str, sizeof partnum_str, "%x", (unsigned) idbyte);
CLEANUP_FREE char *err = NULL;
int r;
diff --git a/daemon/proto.c b/daemon/proto.c
index 7ae8c66..df63bfd 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -157,19 +157,20 @@ main_loop (int _sock)
/* Check the version etc. */
if (hdr.prog != GUESTFS_PROGRAM) {
- reply_with_error ("wrong program (%d)", hdr.prog);
+ reply_with_error ("wrong program (%u)", hdr.prog);
goto cont;
}
if (hdr.vers != GUESTFS_PROTOCOL_VERSION) {
- reply...
2015 Jul 02
0
[PATCH v2] Fix various -Wformat problems.
.../
+ /* NB: hex */
+ snprintf (idbyte_str, sizeof partnum_str, "%x", (unsigned) idbyte);
CLEANUP_FREE char *err = NULL;
int r;
diff --git a/daemon/proto.c b/daemon/proto.c
index 7ae8c66..df63bfd 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -157,19 +157,20 @@ main_loop (int _sock)
/* Check the version etc. */
if (hdr.prog != GUESTFS_PROGRAM) {
- reply_with_error ("wrong program (%d)", hdr.prog);
+ reply_with_error ("wrong program (%u)", hdr.prog);
goto cont;
}
if (hdr.vers != GUESTFS_PROTOCOL_VERSION) {
- reply...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...error (EXIT_FAILURE, errno, "setmntent: %s", "/proc/mounts");
while ((m = getmntent (fp)) != NULL) {
if (verbose) {
diff --git a/daemon/proto.c b/daemon/proto.c
index c3972f1..654dd3a 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -107,11 +107,8 @@ main_loop (int _sock)
if (len == GUESTFS_CANCEL_FLAG)
continue;
- if (len > GUESTFS_MESSAGE_MAX) {
- fprintf (stderr, "guestfsd: incoming message is too long (%u bytes)\n",
- len);
- exit (EXIT_FAILURE);
- }
+ if (len > GUESTFS_MESSAGE_MAX)
+ error (EX...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...a/fish/rc.c b/fish/rc.c
index d4d2015..ad673f8 100644
--- a/fish/rc.c
+++ b/fish/rc.c
@@ -30,6 +30,7 @@
#include <signal.h>
#include <sys/socket.h>
#include <errno.h>
+#include <error.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
@@ -54,11 +55,9 @@ create_sockdir (void)
/* Create the directory, and ensure it is owned by the user. */
snprintf (dir, sizeof dir, SOCKET_DIR, (uintmax_t) euid);
r = mkdir (dir, 0700);
- if (r == -1 && errno != EEXIST) {
+ if (r == -1 && errno != EEXIST)
error:
- perror (dir);
- exit (EXIT_FA...