Bug #71403 [Fbk->NoF]: odbc segfault

From: Date: Sun, 11 Oct 2020 04:22:14 +0000
Subject: Bug #71403 [Fbk->NoF]: odbc segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229534@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71403&edit=1

 ID:               71403
 Updated by:       php-bugs@lists.php.net
 Reported by:      ice21zero at gmail dot com
 Summary:          odbc segfault
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          PDO ODBC
 Operating System: CentOS 6.7 , Ubuntu 14.04
 PHP Version:      7.0.3
 Assigned To:      cmb
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2020-09-28 15:53:52] cmb@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

------------------------------------------------------------------------
[2016-02-08 22:22:24] ice21zero at gmail dot com

updated to php 7.0.3 , result the same segmentation fault mayme memory leak in some module

------------------------------------------------------------------------
[2016-01-21 15:21:12] ice21zero at gmail dot com

not able to exclude code from project to one sript. build php from git php-src and se that now.

Call Stack:
    0.0001     352472   1. {main}() /var/www/optimisator/app/Console/cake.php:0
    0.0006     417832   2. ShellDispatcher::run() /var/www/optimisator/app/Console/cake.php:34
    0.0210    3973768   3. ShellDispatcher->dispatch()
/var/www/optimisator/lib/Cake/Console/ShellDispatcher.php:66
    0.0264    4911936   4. Shell->runCommand()
/var/www/optimisator/lib/Cake/Console/ShellDispatcher.php:207
    0.0439    5393536   5. CronShell->doNow() /var/www/optimisator/lib/Cake/Console/Shell.php:357
    0.4249   12563576   6. k50WorkerJob->gearman_runEvent()
/var/www/optimisator/app/Console/Command/CronShell.php:352
    0.4249   12563952   7. k50WorkerJob->__call()
/var/www/optimisator/app/Console/Command/CronShell.php:352
    0.6536   12609808   8. gearman_runEvent()
/var/www/optimisator/app/Lib/k50/Workers/k50WorkerJob.php:79
    0.6594   13272984   9. Event->run() /var/www/optimisator/app/Lib/k50/Workers/events.php:27
    0.7858   17558792  10. Event->runDirectKeysEvent()
/var/www/optimisator/app/Model/Event.php:493
   13.7959   57432336  11. DirectRules->checkRulesForKeys()
/var/www/optimisator/app/Model/Event.php:1027
   13.7963   57436880  12. DirectAggregatedRows->getKeysParams()
/var/www/optimisator/app/Model/DirectRules.php:388
   14.5799  140151568  13. VerticaReportStatistics->getStoredStat()
/var/www/optimisator/app/Model/DirectAggregatedRows.php:182
   14.6201  140156808  14. VerticaReportStatistics->iterateRecords()
/var/www/optimisator/app/Lib/k50/Stat/VerticaReportStatistics.php:53
   14.6205  140159632  15. VerticaDirectKeys->createSqlParameters()
/var/www/optimisator/app/Lib/k50/Stat/VerticaReportStatistics.php:150
   14.6266  140425336  16. StatQueryBuilder->finalize()
/var/www/optimisator/app/Model/VerticaDirectKeys.php:176
   14.6266  140426536  17. SimpleQueryBuilder->getSql()
/var/www/optimisator/app/Lib/k50/Stat/StatQueryBuilder.php:673
   14.6266  140427232  18. Vertica->buildStatement()
/var/www/optimisator/app/Lib/k50/SimpleQueryBuilder.php:78
   14.6267  140437200  19. Vertica->renderStatement()
/var/www/optimisator/app/Model/Datasource/Database/Vertica.php:1125

Fatal Error Error: Allowed memory size of 12582912000 bytes exhausted (tried to allocate
140453607299560 bytes) in [/var/www/optimisator/app/Model/Datasource/Database/Vertica.php, line
1152]

------------------------------------------------------------------------
[2016-01-18 15:43:22] pajoye@php.net

Do you have a script like please?

1. connect
2. query with the actual query being used
3. fetch
4. close (if used in your initial report)

------------------------------------------------------------------------
[2016-01-18 14:02:48] ice21zero at gmail dot com

odbc_result() /var/www/optimisator/app/Vendor/Vertica/VerticaStatement.php:130
odbc_field_name() /var/www/optimisator/app/Vendor/Vertica/VerticaStatement.php:130
    
--- code sample start ----

public function fetch($fetchMode = null, $cursor_orientation = null, $cursor_offset = null)
    {
        $fetchMode = $fetchMode ?: $this->defaultFetchMode;

        if (!$fetched = @odbc_fetch_row($this->sth)) {
            return false;
        }

        $numFields = odbc_num_fields($this->sth);
        $row = [];

        switch ($fetchMode) {
            case \PDO::FETCH_ASSOC:
            case \PDO::FETCH_OBJ:
            case \PDO::FETCH_LAZY:
                for ($i = 1; $i <= $numFields; $i++) {
/*row 130 */                   $row[odbc_field_name($this->sth, $i)] = odbc_result($this->sth,
$i);
                }
                if (
                    \PDO::FETCH_OBJ == $fetchMode or
                    \PDO::FETCH_LAZY == $fetchMode
                ) {
                    $row = (object)$row;
                }
                break;

            case \PDO::FETCH_NUM:
                for ($i = 1; $i <= $numFields; $i++) {
                    $row[] = odbc_result($this->sth, $i);
                }
                break;

            case \PDO::FETCH_BOTH;
                for ($i = 1; $i <= $numFields; $i++) {
                    $value = odbc_result($this->sth, $i);

                    $row[] = $row[odbc_field_name($this->sth, $i)] = $value;
                }
                break;

            default:
                throw new VerticaException(sprintf('Unsupported fetch mode
"%s"', $fetchMode));
        }

        return $row;
}

--- code sample end ----

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=71403


--
Edit this bug report at https://bugs.php.net/bug.php?id=71403&edit=1


Thread (8 messages)

« previous php.bugs (#229534) next »