Modify

Ticket #4655 (closed Bugs: fixed)

Opened 4 years ago

Last modified 11 months ago

[Interprocess] The shared_memory_object::remove return false on success

Reported by: Kistner Eric <eric.kistner@…> Owned by: igaztanaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:

Description

The shared_memory_object::remove return false on success. This is due to the code doing: return detail::delete_file(shmfile.c_str()) == 0;

but the detail::delete_file already return a bool that is true on succes

Simply remove the ==0 fix the problem.

Attachments

Change History

comment:1 Changed 4 years ago by Kistner Eric <eric.kistner@…>

  • Status changed from new to closed
  • Resolution set to fixed

It seems to be fixed in the svn-trunk.

comment:2 Changed 3 years ago by Volker Wippel <Volker.Wippel@…>

  • Status changed from closed to reopened
  • Version changed from Boost 1.44.0 to Boost 1.46.1
  • Resolution fixed deleted

boost 1.46.1, WinXP, MS VC2005

shared_memory_object::remove still returns false on success in about 1 of 30 calls. Label_A message below pops up.

string const name = m_ShMem->get_name();
m_TraceQueue->removeUser();  m_TraceQueue->~SharedMemTraceQueue();
delete m_ShRegion;           delete m_ShMem;
for (bool toDelete = true; toDelete; ) {
    toDelete = !boost::interprocess::shared_memory_object::remove(name.c_str());
    if (toDelete) {
        struct stat buff;    string fullName;
        boost::interprocess::detail::tmp_filename(name.c_str(), fullName);
        toDelete = (0 == stat(fullName.c_str(), &buff));
        if (toDelete)
            cerr << "Still trying to remove " << name << endl; //sleep...
        else
            cerr << name << " not existing anymore. Skip\n"; // Label_A
    }
}

comment:3 Changed 2 years ago by igaztanaga

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in Boost 1.48

comment:4 Changed 21 months ago by Volker.Wippel@…

  • Status changed from closed to reopened
  • Version changed from Boost 1.46.1 to Boost 1.50.0
  • Resolution fixed deleted

Fixed up to 1.49, again occurs in 1.50.

comment:5 Changed 14 months ago by igaztanaga

This seems related to bug #7923, that is already fixed. Can you try trunk code to see if this bug is also fixed?

comment:6 Changed 11 months ago by igaztanaga

  • Status changed from reopened to closed
  • Resolution set to fixed

This bug seems fixed with #7923.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.