Displaying 20 results from an estimated 100000 matches similar to: "Locks and preventing agaisnt race-conditions with the db"
2006 Aug 08
0
Using class or global variable in rails - Are there any threading issues or race conditions?
Hi All
I am newbie to Rails.. and I am trying to invoke a third party webservice
using SOAP::RPC::Driver object. Now I can''t store that in session (it throws
TypeError) so the next best thing (on the suggestion by Ola
from this mailing list) I am storing it in Class variable or I can
store this rpc_driver object in global variable.
In brief my concerns are related to race conditions that
2006 Jun 27
2
Avoiding race conditions
I want to be able to display a number of messages, and guarantee that
they''re only displayed once. Something like this :
def get_new_messages
@messages = Message.find(:all, :limit => 5, :conditions => ''new = 1'')
@messages.each do |msg|
msg.new = 0
msg.save
end
end
However, there''s a race condition in the above code if two users try
to access
2017 Nov 14
0
[PATCH 2/3] Avoid race conditions when nbdkit exits.
There are several race conditions where nbdkit exits (calling
plugin_cleanup() which unloads the plugin), while the plugin is either
in a callback or in plugin.close().
Avoid these by:
(1) Taking a shared lock around all plugin callbacks.
(2) Taking the same as an exclusive lock in plugin_cleanup.
This delays plugin_cleanup until all callbacks have finished.
(3) Removing a few unnecessary
2017 Nov 16
0
Re: [PATCH 0/3] Alternate way to avoid race conditions when nbdkit exits.
On 11/14/2017 11:30 AM, Richard W.M. Jones wrote:
> This fixes the race conditions for me, using the test described here:
>
> https://www.redhat.com/archives/libguestfs/2017-September/msg00226.html
Running test-socket-activation in a loop, I've hit other races (some
provoked a bit more easily with the code I'm working on), and will be
posting some patches where I know the
2007 Sep 18
3
newbie question about a dbuf-arc eviction race
Hi,
Can a dbuf be in DB_CACHED state, db_holds == 0,
b_efunc != NULL while its db_buf is put on the
eviction list ? From an ASSERT in dbuf_do_evict(),
it appears that it can. If it can, I am wondering what
is preventing the following race
dbuf_hold_impl()
db = dbuf_find(dn, level, blkid);
...
if (db->db_buf && refcount_is_zero(&db->db_holds)) {
2006 Mar 19
4
elemental race conditions question
What''s the standard way to prevent race conditions in controllers?
Say user has many posts.
Post controller has action add_post that receives user id, post
controller find()s the user and while he is creating the post entry
an administrator deletes that user in a separate session. We cannot
assume the database checks foreign key integrity. How do you get that
right?
-- fxn
2010 Dec 06
0
2.6.18-194.26.1.el5 NFS4 race conditions?
Are there any known race conditions with 2.6.18-194.26.1.el5 x86_64 and
NFS4?
Today a user managed to shut down two identical Intel servers by copying
a simple text file via NFS4.
Reverting back to 17.1 made the error disappear.
On other non-identical hardware the error was not reproducible (so it
must be a combination of hardware and this special kernel revision).
Anybody interested in a
2017 Jan 02
12
[Bug 2659] New: Fix race conditions in forwarding tests
https://bugzilla.mindrot.org/show_bug.cgi?id=2659
Bug ID: 2659
Summary: Fix race conditions in forwarding tests
Product: Portable OpenSSH
Version: 7.4p1
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Regression tests
Assignee:
2006 Jan 12
0
Independent SQL connections...race condition?
I would like to be able to manage different db connections per request. I''ve
gotten this working by using establish_connection in a before_filter on all
controllers. My concern is whether or not there could be a race condition
where two or more overlapping requests might reset the SQL connection. Is
there any serialization logic which will prevent this? Must I introduce this
logic
2009 Aug 10
1
[PATCH server] Fixed db-omatic so it doesn't die due to an unhandled ActiveRecord::StaleObjectError exception.
The error is caused by the save! method updating an object that another
thread (most likely in taskomatic) already updated.
In the case of this race condition, we retry saving. However, a proper fix
would involve fixing the locking.
---
src/db-omatic/db_omatic.rb | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/db-omatic/db_omatic.rb
2017 Nov 14
7
[PATCH 0/3] Alternate way to avoid race conditions when nbdkit exits.
This fixes the race conditions for me, using the test described here:
https://www.redhat.com/archives/libguestfs/2017-September/msg00226.html
Rich.
2005 Apr 06
1
File locks db (manually removing locks)
After killing an smbd process, or occasionally after a process has died
itself, there remains a lock as indicated in an smbstatus output.
The process ID tied to the file lock in the db is no longer active, yet the
db entry still exists. Is there a way to manually manipulate the file locks
db? If not, will any of these entries prohibit another smbd process from
handling the file which is indicated
2009 Mar 17
4
Preventing a submitted hash from ActiveRecord DB store
Hi all,
I have a multi model form (Project with many tasks) and I want to
prevent a task from being saved to the DB if it is empty ie. if there
is no i/p for that task from the user. I tried the following
class Task < ActiveRecord::Base
before_save :check_if_empty
...
def check_if_empty
self.destroy if description.blank?
end
but i get this
TypeError in ProjectsController#create
2007 Jan 05
1
Voicemail personalised greetings using DB/IMAPbackend?
Does this model give you functioning mwi?
> -----Original Message-----
> From: Ray Jackson [mailto:ray@jacksonz.net]
> Sent: Friday, January 05, 2007 3:17 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] Voicemail personalised greetings using
> DB/IMAPbackend?
>
>
> Hi all,
>
> I am attempting to build a horizontally
2012 Feb 17
0
IO-APIC line level race condition
Sadly, we have discovered another line level interrupt race condition in
Xen-4.1. The result was that an outstanding un-eoi''d interrupt at the
IO-APIC resulted in the mptsas controller offlining the root filesystem.
This is now two separate IO-APIC bugs found recently.
1) Cisco C210 M2 server - EOI Broadcast Suppression, io_apci_ack=old
2) Dell R710 - No EOI Broadcast Suppression,
2005 Oct 13
1
Worrisome race condition involving half-transferred files
Rsync people,
Tell me if I'm wrong, but rsync seems to have a very serious race
condition that would make it risky to transfer files into a directory
writable by someone you don't trust if permissions are going to be
granted to other people on those files.
The rsync receiver creates a half-transferred file with 600 or 700
permissions; then the receiver writes the data and finalizes the
2008 Dec 31
0
[PATCH 2] Cpufreq: prevent negative px resident time, add spinlock to avoid race
Cpufreq: prevent negative px resident time, add spinlock to avoid race
Due to NOW() value may drift between different cpus, we add protection to prevent negative px resident time.
Due to both cpufreq logic and xenpm may race accessing cpufreq_statistic_data, we add spinlock to avoid race.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
_______________________________________________
2004 Aug 09
1
race condition bugs
We're using rsync to update the tables on our email relays, and very
occasionally we get an error in the logs saying that a table has the wrong
permissions. This is because of race conditions in finish_transfer() which
mean that it does not update files atomically. This makes rsync not
entirely safe to use in our situation, where the files being synced are
frequently opened for short periods
2001 Sep 18
1
SIGCHLD race condition?
We use ssh (RedHat 2.5.2p2-5) heavily in non-interactive mode, for
managing servers from central controllers, and transferring applications/
data around networks.
Very occasionally we've seen the situation where the ssh client and
server are both stuck in select, both selecting on only the tcp socket
of the connection, and with no timeout. No children of sshd remain (even
as zombies), and it
2001 Sep 26
1
SIGCHLD race condition? (fwd)
Can anyone offer any advice on this issue? We've tried patching sshd to
have a maximum 10 second timeout when calling select() in serverloop.c,
and this doesn't appear to have had any ill effects.
Thanks,
Paul
------- Forwarded Message
Date: Tue, 18 Sep 2001 16:49:40 -0700
From: Paul Menage <pmenage at ensim.com>
To: mouring at etoh.eviladmin.org
cc: Paul Menage