1
2013-07-17 Uri Lublin <uril@redhat.com>
5
Update spice-common submodule (get spice-protocol 0.12.6)
7
syntax-check: trailing whitespaces -- ignore binary files
9
2013-07-16 Uri Lublin <uril@redhat.com>
11
syntax-check: remove trailing whitespaces
12
Only whitespace changes in this commit.
14
syntax-check: make sure config.h is the first included .h file
16
syntax-check: use test A && test B instead of test A -a B
18
syntax-check: fix no-newline or empty line at EOF
20
syntax-check: s/the the/the/ in a comment
22
syntax-check: update AUTHORS
24
syntax-check: fix cast_of_argument_to_free
25
In this case, make syntax-check is wrong, and we actually do
27
A cast is needed when types are uint64_t <--> pointer
29
Using a local "ptr" variable makes both gcc and syntax-check happy.
31
syntax-check: fix avoid_if_before_free
33
server/tests: fix timer for test_empty_success
35
server/tests: test_display_width_stride: add destroy command
36
Otherwise, the test exits after the first iteration over all tests,
37
on the second attempt to create an already created surface.
39
server/tests: remove option from usage if AUTOMATED_TESTS is not configured
41
server/tests: invalid-option: print the bad argument
42
optind points to the next argument to parse.
44
server/tests: fix produce_command for create surface
45
Earlier in this function, test->target_surface is set to 1, which
46
is the only allowed non-primary surface currently.
48
If surface parameters are given (and specifically data is checked)
49
they are being used, otherwise a default surface is used.
51
Earlier in this function, "command" is set to a non-NULL value.
52
Thus, the else part was unreachable code, which is fixed now.
54
server/tests: test_display_base: set rect according to appropriate surface
55
When surface_id == 0, primary is used.
56
Otherwise (currently 1), secondary is used.
58
Also, remove unused test_width and test_height.
59
Since commit caea7699434c20dceef8fc79d21b8eeb663fbf53,
60
test->width and test->height are used.
62
red_channel: replace RING_FOREACH with RING_FOREACH_SAFE in some places
63
This was originally intended to fix the problem fixed by
64
commit 53488f0275d6c8a121af49f7ac817d09ce68090d.
66
What is left are FOREACH loops that are at less risk and maybe safe (no
67
read/write or disconnect/destroy are called from within them).
69
red_worker: use a generic SAFE_FOREACH macro
70
Introduce SAFE_FOREACH macro
72
Make other safe iterators use SAFE_FOREACH
74
red_worker: delete unused CCC_FOREACH
76
red_worker: make DRAWABLE_FOREACH_DPI safe
78
red_worker: use only DRAWABLE_FOREACH_GLZ_SAFE
80
red_worker: make WORKER_FOREACH_DCC safe
81
Specifically, the loop in red_pipes_add_draw can cause spice to abort.
83
In red_worker.c (WORKER_FOREACH_DCC):
84
red_pipes_add_drawable
86
red_handle_drawable_surfaces_client_synced
87
red_push_surface_image
88
red_channel_client_push
89
red_channel_client_send
90
red_peer_handle_outgoing
91
reds_stream_writev (if fails -- EPIPE)
92
handler->cb->on_error = red_channel_client_disconnect()
93
red_channel_remove_client()
94
ring_remove() -- of rcc from channel.clients ring.
96
red_worker: reuse DCC_FOREACH in WORKER_DCC_FOREACH
97
The only thing that is needed is to get the channel out of the worker.
99
red_worker: use only RCC_FOREACH_SAFE
100
RCC_FOREACH may be dangerous
102
The following patches replace FOREACH loops with a SAFE version.
103
Using unsafe loops may cause spice-server to abort (assert fails).
104
Specifically a read/write fail in those loops, may cause the client
105
to disconnect, removing the node currently iterated, which cause spice
106
to abort in ring_next():
107
-- assertion `pos->next != NULL && pos->prev != NULL' failed
109
2013-07-05 David Gibson <david@gibson.dropbear.id.au>
111
Use RING_FOREACH_SAFE in red_channel.c functions which are missing it
112
Currently, both red_channel_pipes_add_type() and
113
red_channel_pipes_add_empty_msg() use plaing RING_FOREACH() which is not
114
safe versus removals from the ring within the loop body.
116
Although it's rare, such a removal can occur in both cases. In the case
117
of red_channel_pipes_add_type() we have:
118
red_channel_pipes_add_type()
119
-> red_channel_client_pipe_add_type()
120
-> red_channel_client_push()
122
And in the case of red_channel_client_pipes_add_empty_msg() we have:
123
red_channel_client_pipes_add_empty_msg()
124
-> red_channel_client_pipe_add_empty_msg()
125
-> red_channel_client_push()
127
But red_channel_client_push() can cause a removal from the clients ring if
128
a network error occurs:
129
red_channel_client_push()
130
-> red_channel_client_send()
131
-> red_peer_handle_outgoing()
132
-> handler->cb->on_error callback
133
= red_channel_client_default_peer_on_error()
134
-> red_channel_client_disconnect()
135
-> red_channel_remove_client()
138
When this error path does occur, the assertion in RING_FOREACH()'s
139
ring_next() trips, and the process containing the spice server is aborted.
140
i.e. your whole VM dies, as a result of an unfortunately timed network
141
error on the spice channel.
145
2013-06-25 Yonit Halperin <yhalperi@redhat.com>
147
red_worker: fix for stuck display_channel over WAN (jpeg_enabled=true)
148
The image descriptor flags shouldn't be copied as is from the flags that
149
were set by the driver. Specifically, the CACHE_ME flag shouldn't be copied,
150
since it is possible that (a) the image won't be cached (b) the image
151
is already cached, but in its lossy version, and we may want to set the bit for
152
CACHE_REPLACE_ME, in order to cache it in its lossless version.
153
In case (b), the client first looks for the CACHE_ME flag, and only if
154
it is not set it looks for CACHE_REPLACE_ME (see canvas_base.c). Since both flags where set,
155
the client ignored REPLACE_ME, and didn't turned off the lossy flag of the
156
cach item. Then, when a request from this lossles item reached the
157
client (FROM_CACHE_LOSSLESS), the client display channel waited
158
endlessly for the lossless version of the image.
160
2013-06-24 Yonit Halperin <yhalperi@redhat.com>
162
red_worker: improve stream stats readability and ease of parsing
163
also added start/end-bit-rate and avg-quality to the final stream stats.
165
mjpeg_encoder: add mjpeg_encoder_get_stats
167
spice: silencing most of the ping/pong logging
168
Those messages are too frequent and don't contribute much
170
2013-06-06 Hans de Goede <hdegoede@redhat.com>
172
server: Add support for filtering out agent file-xfer msgs (rhbz#961848)
174
2013-05-24 Yonit Halperin <yhalperi@redhat.com>
176
red_channel: replace an assert upon threads mismatch with a warning
178
spice_assert(pthread_equal(pthread_self(), client->thread_id))
180
spice_assert(pthread_equal(pthread_self(), rcc->channel->thread_id))
181
were coded in order to protect data that is accessed from the main
182
context (red_client and most of the channels), from
183
access by threads of other channels (namely, the display and cursor
184
channels), and vice versa.
185
However, some of the calls to the sound channel interface,
186
and also the char_device interface, can be done from the vcpu thread.
187
It doesn't endanger these channels internal data, since qemu use global
188
mutex for the vcpu and io threads.
189
Thus, pthread_self() can be != channel->thread_id, if one of them is
190
the vcpu thread and the other is the io-thread, and we shouldn't assert.
192
Future plans: A more complete and complicated solution would be to manage our own thread for
193
spice-channels, and push input from qemu to this thread, instead of
194
counting on the global mutex of qemu
198
2013-05-23 Yonit Halperin <yhalperi@redhat.com>
200
main_channel: fix double release of migration target data
201
If client_migrate_info was called once with cert-host-subject and
202
then again without cert-host-subject, on a third call to
203
client_migrate info, the cert-host-subject from the first call would
204
have been freed for the second time.
206
2013-05-19 Christophe Fergeau <cfergeau@redhat.com>
208
Log actual address spice-server binds to
209
It's not always obvious what address spice-server will bind to,
210
in particular when the 'addr' parameter is omitted on QEMU
211
commandline. The decision of what address to bind to is made
212
in reds_init_socket with a call to getaddrinfo. Surprisingly,
213
that function had a call to getnameinfo() already, but it does
214
not seem to be using the result of that call in any way.
215
This commit moves this call after the socket is successfully bound
216
and add a log message to indicate which address it's bound to.
1
218
2013-05-17 Alon Levy <alevy@redhat.com>